Change run_goofy_{host,device} tag file path.
The original toolkit installs tag file to either:
1. <stateful>/var_overlay/factory/state (on test image), or
2. /var/factory/state (on host)
As <stateful>/var_overlay/factory is not copied to DUT in
chromeos-install, we should change the tag file path to
<stateful>/dev_image/factory.
BUG=chrome-os-partner:30202
TEST=unittest
TEST=chromeos-install a test image on my DUT, install toolkit on top
the test image, reboot and verify goofy comes up
TEST=install toolkit into a test image to create factory test image,
chromeos-install the factory test image on my DUT, reboot and
verify goofy comes up
Change-Id: I8ecfb6cd8fdab840265dc2fbab0ba8052a8fda8f
Reviewed-on: https://chromium-review.googlesource.com/207281
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/py/toolkit/installer.py b/py/toolkit/installer.py
index bab679d..7b67cb7 100755
--- a/py/toolkit/installer.py
+++ b/py/toolkit/installer.py
@@ -135,12 +135,12 @@
self._tag_file = os.path.join(self._usr_local_dest, 'factory', 'enabled')
self._enable_host = enable_host
- self._host_tag_file = os.path.join(self._var_dest, 'factory',
- 'state', 'run_goofy_host')
+ self._host_tag_file = os.path.join(self._usr_local_dest, 'factory',
+ 'init', 'run_goofy_host')
self._enable_device = enable_device
- self._device_tag_file = os.path.join(self._var_dest, 'factory',
- 'state', 'run_goofy_device')
+ self._device_tag_file = os.path.join(self._usr_local_dest, 'factory',
+ 'init', 'run_goofy_device')
if (not os.path.exists(self._usr_local_src) or
not os.path.exists(self._var_src)):