diff options
author | Cassidy Burden <cburden@google.com> | 2016-08-08 10:27:34 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-09 13:06:54 -0700 |
commit | a5e3929d7a155606bc541777fc84e4989389e13c (patch) | |
tree | e0f2e69f8714c76899c9c3281f0cded309457e1f /binary_search_tool | |
parent | d0b69bedbb9eb087ab231adbbe3af1ba26a945a3 (diff) | |
download | toolchain-utils-a5e3929d7a155606bc541777fc84e4989389e13c.tar.gz |
binary search tool: Rename install to test_setup
Refactor warning! Rename install script to be test_setup script.
TEST=Run unit tests
Change-Id: Iab7e01136fdcf2dedbfc94ece6ddb4b4fa3c0f68
Reviewed-on: https://chrome-internal-review.googlesource.com/273484
Commit-Ready: Cassidy Burden <cburden@google.com>
Tested-by: Cassidy Burden <cburden@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'binary_search_tool')
23 files changed, 77 insertions, 79 deletions
diff --git a/binary_search_tool/README.bisect b/binary_search_tool/README.bisect index 50df527f..e6185e8a 100644 --- a/binary_search_tool/README.bisect +++ b/binary_search_tool/README.bisect @@ -38,7 +38,7 @@ Bisection Methods: --get_initial_items='cros_pkg/get_initial_items.sh' --switch_to_good='cros_pkg/switch_to_good.sh' --switch_to_bad='cros_pkg/switch_to_bad.sh' - --install_script='cros_pkg/install.sh' + --test_setup_script='cros_pkg/test_setup.sh' --test_script='cros_pkg/interactive_test.sh' --incremental --prune @@ -95,7 +95,7 @@ Bisection Methods: --get_initial_items='sysroot_wrapper/get_initial_items.sh' --switch_to_good='sysroot_wrapper/switch_to_good.sh' --switch_to_bad='sysroot_wrapper/switch_to_bad.sh' - --install_script='sysroot_wrapper/install.sh' + --test_setup_script='sysroot_wrapper/test_setup.sh' --test_script='sysroot_wrapper/interactive_test.sh' --noincremental --prune @@ -166,7 +166,7 @@ Bisection Methods: --get_initial_items='android/get_initial_items.sh' --switch_to_good='android/switch_to_good.sh' --switch_to_bad='android/switch_to_bad.sh' - --install_script='android/install.sh' + --test_setup_script='android/test_setup.sh' --test_script='android/interactive_test.sh' --incremental --prune @@ -205,7 +205,7 @@ Overriding: is used to test the bisecting tool itself -- see comments in hash_test.sh for more details): ./bisect.py package daisy 172.17.211.182 \ - --test_script=common/hash_test.sh --install_script="" + --test_script=common/hash_test.sh --test_setup_script="" Example 3 (enable verbose mode, disable pruning, and disable verification): ./bisect.py package daisy 172.17.211.182 \ diff --git a/binary_search_tool/android/README.android b/binary_search_tool/android/README.android index 04402322..9e518f60 100644 --- a/binary_search_tool/android/README.android +++ b/binary_search_tool/android/README.android @@ -45,7 +45,7 @@ following: --get_initial_items=android/get_initial_items.sh \ --switch_to_good=android/switch_to_good.sh \ --switch_to_bad=android/switch_to_bad.sh \ - --install_script=android/install.sh \ + --test_setup_script=android/test_setup.sh \ --test_script=$TEST_SCRIPT \ --file_args \ --prune @@ -72,10 +72,10 @@ FILES AND SCRIPTS: get_initial_items.sh - This script is used to determine all Android objects that will be bisected. - install.sh - This script will build and flash your image to the - Android device. If the flash fails, this script will - help the user troubleshoot by trying to flash again or - by asking the user to manually flash it. + test_setup.sh - This script will build and flash your image to the + Android device. If the flash fails, this script will + help the user troubleshoot by trying to flash again or + by asking the user to manually flash it. interactive_test.sh - One of two possible scripts used to determine if the Android image built from the objects @@ -176,7 +176,7 @@ isolate/identify the bad object: --get_initial_items=android/get_initial_items.sh \ --switch_to_good=android/switch_to_good.sh \ --switch_to_bad=android/switch_to_bad.sh \ - --install_script=android/install.sh \ + --test_setup_script=android/test_setup.sh \ --test_script=android/boot_test.sh \ # could use interactive_test.sh instead --prune diff --git a/binary_search_tool/android/boot_test.sh b/binary_search_tool/android/boot_test.sh index 26095187..dc871601 100755 --- a/binary_search_tool/android/boot_test.sh +++ b/binary_search_tool/android/boot_test.sh @@ -6,8 +6,8 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on the Android source tree. It -# waits for the install script to build and install the image, then checks if -# image boots or not. It should return '0' if the test succeeds +# waits for the test setup script to build and install the image, then checks +# if image boots or not. It should return '0' if the test succeeds # (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125' # if it could not determine (does not apply in this case). # diff --git a/binary_search_tool/android/interactive_test.sh b/binary_search_tool/android/interactive_test.sh index 16a5753c..e506b236 100755 --- a/binary_search_tool/android/interactive_test.sh +++ b/binary_search_tool/android/interactive_test.sh @@ -8,7 +8,7 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on the Android source tree. It -# waits for the install script to build and install the image, then asks the +# waits for the test setup script to build and install the image, then asks the # user if the image is good or not. It should return '0' if the test succeeds # (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125' # if it could not determine (does not apply in this case). diff --git a/binary_search_tool/android/install.sh b/binary_search_tool/android/test_setup.sh index 56683e89..aacde2fd 100755 --- a/binary_search_tool/android/install.sh +++ b/binary_search_tool/android/test_setup.sh @@ -2,7 +2,7 @@ # # Copyright 2016 Google Inc. All Rights Reserved. # -# This is the install script for generating an Android image based off the +# This is the test setup script for generating an Android image based off the # current working build tree. make is called to relink the object files and # generate the new Android image to be flashed. The device is then rebooted into # bootloader mode and fastboot is used to flash the new image. The device is @@ -10,7 +10,7 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on the Android source tree. It should -# return '0' if the install succeeds; and '1' if the install fails (the image +# return '0' if the setup succeeds; and '1' if the setup fails (the image # could not build or be flashed). # diff --git a/binary_search_tool/binary_search_state.py b/binary_search_tool/binary_search_state.py index fac5a7fc..f0415667 100755 --- a/binary_search_tool/binary_search_state.py +++ b/binary_search_tool/binary_search_state.py @@ -62,13 +62,13 @@ class BinarySearchState(object): """The binary search state class.""" def __init__(self, get_initial_items, switch_to_good, switch_to_bad, - install_script, test_script, incremental, prune, iterations, + test_setup_script, test_script, incremental, prune, iterations, prune_iterations, verify, file_args, verbose): """BinarySearchState constructor, see Run for full args documentation.""" self.get_initial_items = get_initial_items self.switch_to_good = switch_to_good self.switch_to_bad = switch_to_bad - self.install_script = install_script + self.test_setup_script = test_setup_script self.test_script = test_script self.incremental = incremental self.prune = prune @@ -168,12 +168,12 @@ class BinarySearchState(object): ret, _, _ = self.ce.RunCommandWExceptionCleanup(command) return ret - def InstallScript(self): - """Run install script and return exit code from script.""" - if not self.install_script: + def TestSetupScript(self): + """Run test setup script and return exit code from script.""" + if not self.test_setup_script: return 0 - command = self.install_script + command = self.test_setup_script ret, _, _ = self.ce.RunCommandWExceptionCleanup(command) return ret @@ -194,8 +194,8 @@ class BinarySearchState(object): with SetFile(GOOD_SET_VAR, self.all_items), SetFile(BAD_SET_VAR, []): self.l.LogOutput('Resetting all items to good to verify.') self.SwitchToGood(self.all_items) - status = self.InstallScript() - assert status == 0, 'When reset_to_good, install should succeed.' + status = self.TestSetupScript() + assert status == 0, 'When reset_to_good, test setup should succeed.' status = self.TestScript() assert status == 0, 'When reset_to_good, status should be 0.' @@ -203,8 +203,8 @@ class BinarySearchState(object): with SetFile(GOOD_SET_VAR, []), SetFile(BAD_SET_VAR, self.all_items): self.l.LogOutput('Resetting all items to bad to verify.') self.SwitchToBad(self.all_items) - status = self.InstallScript() - assert status == 0, 'When reset_to_bad, install should succeed.' + status = self.TestSetupScript() + assert status == 0, 'When reset_to_bad, test setup should succeed.' status = self.TestScript() assert status == 1, 'When reset_to_bad, status should be 1.' @@ -282,11 +282,11 @@ class BinarySearchState(object): # TODO: bad_items should come first. self.SwitchToGood(good_items) self.SwitchToBad(bad_items) - status = self.InstallScript() + status = self.TestSetupScript() if status == 0: status = self.TestScript() else: - # Install script failed, treat as skipped item + # Test setup script failed, treat as skipped item status = 125 terminated = self.binary_search.SetStatus(status) @@ -449,7 +449,7 @@ class MockBinarySearchState(BinarySearchState): 'get_initial_items': 'echo "1"', 'switch_to_good': None, 'switch_to_bad': None, - 'install_script': None, + 'test_setup_script': None, 'test_script': None, 'incremental': True, 'prune': False, @@ -478,7 +478,7 @@ def _CanonicalizeScript(script_name): def Run(get_initial_items, switch_to_good, switch_to_bad, test_script, - install_script=None, iterations=50, prune=False, noincremental=False, + test_setup_script=None, iterations=50, prune=False, noincremental=False, file_args=False, verify=True, prune_iterations=100, verbose=False, resume=False): """Run binary search tool. Equivalent to running through terminal. @@ -491,8 +491,8 @@ def Run(get_initial_items, switch_to_good, switch_to_bad, test_script, set test_script: Script that will determine if the current combination of good and bad items make a "good" or "bad" result. - install_script: Script to do necessary setup (building, compilation, etc.) - for test_script + test_setup_script: Script to do necessary setup (building, compilation, + etc.) for test_script. iterations: How many binary search iterations to run before exiting. prune: If False the binary search tool will stop when the first bad item is found. Otherwise then binary search tool will continue searching @@ -519,8 +519,8 @@ def Run(get_initial_items, switch_to_good, switch_to_bad, test_script, else: switch_to_good = _CanonicalizeScript(switch_to_good) switch_to_bad = _CanonicalizeScript(switch_to_bad) - if install_script: - install_script = _CanonicalizeScript(install_script) + if test_setup_script: + test_setup_script = _CanonicalizeScript(test_setup_script) test_script = _CanonicalizeScript(test_script) get_initial_items = _CanonicalizeScript(get_initial_items) incremental = not noincremental @@ -528,7 +528,7 @@ def Run(get_initial_items, switch_to_good, switch_to_bad, test_script, binary_search_perforce.verbose = verbose bss = BinarySearchState(get_initial_items, switch_to_good, switch_to_bad, - install_script, test_script, incremental, prune, + test_setup_script, test_script, incremental, prune, iterations, prune_iterations, verify, file_args, verbose) bss.DoVerify() diff --git a/binary_search_tool/bisect.py b/binary_search_tool/bisect.py index dbe95d88..f6928115 100755 --- a/binary_search_tool/bisect.py +++ b/binary_search_tool/bisect.py @@ -54,7 +54,7 @@ class Bisector(object): get_initial_items : cros_pkg/get_initial_items.sh switch_to_good : cros_pkg/switch_to_good.sh switch_to_bad : cros_pkg/switch_to_bad.sh - * install_script : + * test_setup_script : * test_script : cros_pkg/my_test.sh prune : True noincremental : False @@ -136,7 +136,7 @@ class BisectPackage(Bisector): 'get_initial_items': 'cros_pkg/get_initial_items.sh', 'switch_to_good': 'cros_pkg/switch_to_good.sh', 'switch_to_bad': 'cros_pkg/switch_to_bad.sh', - 'install_script': 'cros_pkg/install.sh', + 'test_setup_script': 'cros_pkg/test_setup.sh', 'test_script': 'cros_pkg/interactive_test.sh', 'noincremental': False, 'prune': True, @@ -183,7 +183,7 @@ class BisectObject(Bisector): 'get_initial_items': 'sysroot_wrapper/get_initial_items.sh', 'switch_to_good': 'sysroot_wrapper/switch_to_good.sh', 'switch_to_bad': 'sysroot_wrapper/switch_to_bad.sh', - 'install_script': 'sysroot_wrapper/install.sh', + 'test_setup_script': 'sysroot_wrapper/test_setup.sh', 'test_script': 'sysroot_wrapper/interactive_test.sh', 'noincremental': True, 'prune': True, @@ -238,7 +238,7 @@ class BisectAndroid(Bisector): 'get_initial_items': 'android/get_initial_items.sh', 'switch_to_good': 'android/switch_to_good.sh', 'switch_to_bad': 'android/switch_to_bad.sh', - 'install_script': 'android/install.sh', + 'test_setup_script': 'android/test_setup.sh', 'test_script': 'android/interactive_test.sh', 'prune': True, 'file_args': True, diff --git a/binary_search_tool/common.py b/binary_search_tool/common.py index f6f496ae..11c6cef1 100644 --- a/binary_search_tool/common.py +++ b/binary_search_tool/common.py @@ -157,8 +157,8 @@ def _BuildArgsDict(args): 'If your switch script requires user input ' 'the --verbose option must be used')) args.AddArgument('-I', - '--install_script', - dest='install_script', + '--test_setup_script', + dest='test_setup_script', help=('Optional script to perform building, flashing, ' 'and other setup before the test script runs.')) args.AddArgument('-t', diff --git a/binary_search_tool/common/boot_test.sh b/binary_search_tool/common/boot_test.sh index 2681f561..8f6d9a7d 100755 --- a/binary_search_tool/common/boot_test.sh +++ b/binary_search_tool/common/boot_test.sh @@ -6,10 +6,10 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on ChromeOS package and object files. -# It waits for the install script to build and install the image, then pings the -# machine. It should return '0' if the test succeeds (the image booted); '1' if -# the test fails (the image did not boot); and '125' if it could not determine -# (does not apply in this case). +# It waits for the test setup script to build and install the image, then pings +# the machine. It should return '0' if the test succeeds (the image booted); '1' +# if the test fails (the image did not boot); and '125' if it could not +# determine (does not apply in this case). # source common/common.sh diff --git a/binary_search_tool/common/hash_test.sh b/binary_search_tool/common/hash_test.sh index 741f4237..5450988e 100755 --- a/binary_search_tool/common/hash_test.sh +++ b/binary_search_tool/common/hash_test.sh @@ -4,7 +4,7 @@ # # This script is intended to be used by binary_search_state.py. It is to # be used for testing/development of the binary search triage tool -# itself. It waits for the install script to build and install the +# itself. It waits for the test setup script to build and install the # image, then checks the hashes in the provided file. # If the real hashes match the checksum hashes, then the image is 'good', # otherwise it is 'bad'. This allows the rest of the bisecting tool diff --git a/binary_search_tool/common/interactive_test.sh b/binary_search_tool/common/interactive_test.sh index a52bd2ee..8773dd12 100755 --- a/binary_search_tool/common/interactive_test.sh +++ b/binary_search_tool/common/interactive_test.sh @@ -8,7 +8,7 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on ChromeOS package and object files. It -# waits for the install script to build and install the image, then asks the +# waits for the test setup script to build and install the image, then asks the # user if the image is good or not. It should return '0' if the test succeeds # (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125' # if it could not determine (does not apply in this case). diff --git a/binary_search_tool/common/install.sh b/binary_search_tool/common/test_setup.sh index f1aff40c..7aae9c9c 100755 --- a/binary_search_tool/common/install.sh +++ b/binary_search_tool/common/test_setup.sh @@ -2,7 +2,7 @@ # # Copyright 2016 Google Inc. All Rights Reserved. # -# This is a generic ChromeOS package/image installation script. It is meant to +# This is a generic ChromeOS package/image test setup script. It is meant to # be used for either the object file or package bisection tools. This script # does one of the following depending on what ${BISECT_MODE} is set to: # @@ -20,7 +20,7 @@ # # This script is intended to be used by binary_search_state.py, as # part of the binary search triage on ChromeOS objects and packages. It should -# return '0' if the install succeeds; and '1' if the install fails (the image +# return '0' if the setup succeeds; and '1' if the setup fails (the image # could not build or be flashed). # diff --git a/binary_search_tool/cros_pkg/README.cros_pkg_triage b/binary_search_tool/cros_pkg/README.cros_pkg_triage index 0e3c0e03..5e285008 100644 --- a/binary_search_tool/cros_pkg/README.cros_pkg_triage +++ b/binary_search_tool/cros_pkg/README.cros_pkg_triage @@ -35,7 +35,7 @@ following: --get_initial_items=cros_pkg/get_initial_items.sh \ --switch_to_good=cros_pkg/switch_to_good.sh \ --switch_to_bad=cros_pkg/switch_to_bad.sh \ - --install_script=cros_pkg/install.sh \ + --test_setup_script=cros_pkg/test_setup.sh \ --test_script=cros_pkg/boot_test.sh \ --file_args \ --prune @@ -46,7 +46,7 @@ following: --get_initial_items=cros_pkg/get_initial_items.sh \ --switch_to_good=cros_pkg/switch_to_good.sh \ --switch_to_bad=cros_pkg/switch_to_bad.sh \ - --install_script=cros_pkg/install.sh \ + --test_setup_script=cros_pkg/test_setup.sh \ --test_script=cros_pkg/interactive_test.sh \ --file_args \ --prune @@ -77,10 +77,10 @@ FILES AND SCRIPTS: get_initial_items.sh - This script is used to determine the current set of ChromeOS packages. - install.sh - This script will build and flash your image to the - remote machine. If the flash fails, this script will - help the user troubleshoot by flashing through usb or - by retrying the flash over ethernet. + test_setup.sh - This script will build and flash your image to the + remote machine. If the flash fails, this script will + help the user troubleshoot by flashing through usb or + by retrying the flash over ethernet. interactive_test.sh - One of two possible scripts used to determine if the ChromeOS image built from the packages @@ -175,7 +175,7 @@ isolate/identify the bad package: --get_initial_items=cros_pkg/get_initial_items.sh \ --switch_to_good=cros_pkg/switch_to_good.sh \ --switch_to_bad=cros_pkg/switch_to_bad.sh \ - --install_script=cros_pkg/install.sh \ + --test_setup_script=cros_pkg/test_setup.sh \ --test_script=cros_pkg/boots_test.sh \ # could use interactive_test.sh instead --prune diff --git a/binary_search_tool/cros_pkg/install.sh b/binary_search_tool/cros_pkg/install.sh deleted file mode 120000 index 562f7bbe..00000000 --- a/binary_search_tool/cros_pkg/install.sh +++ /dev/null @@ -1 +0,0 @@ -../common/install.sh
\ No newline at end of file diff --git a/binary_search_tool/cros_pkg/test_setup.sh b/binary_search_tool/cros_pkg/test_setup.sh new file mode 120000 index 00000000..39e715f6 --- /dev/null +++ b/binary_search_tool/cros_pkg/test_setup.sh @@ -0,0 +1 @@ +../common/test_setup.sh
\ No newline at end of file diff --git a/binary_search_tool/sysroot_wrapper/install.sh b/binary_search_tool/sysroot_wrapper/install.sh deleted file mode 120000 index 562f7bbe..00000000 --- a/binary_search_tool/sysroot_wrapper/install.sh +++ /dev/null @@ -1 +0,0 @@ -../common/install.sh
\ No newline at end of file diff --git a/binary_search_tool/sysroot_wrapper/test_setup.sh b/binary_search_tool/sysroot_wrapper/test_setup.sh new file mode 120000 index 00000000..39e715f6 --- /dev/null +++ b/binary_search_tool/sysroot_wrapper/test_setup.sh @@ -0,0 +1 @@ +../common/test_setup.sh
\ No newline at end of file diff --git a/binary_search_tool/test/binary_search_tool_tester.py b/binary_search_tool/test/binary_search_tool_tester.py index 28e6afc8..12013d32 100755 --- a/binary_search_tool/test/binary_search_tool_tester.py +++ b/binary_search_tool/test/binary_search_tool_tester.py @@ -39,7 +39,7 @@ class BisectTest(unittest.TestCase): """Tests for bisect.py""" def setUp(self): - with open('./installed', 'w'): + with open('./is_setup', 'w'): pass try: @@ -49,7 +49,7 @@ class BisectTest(unittest.TestCase): def tearDown(self): try: - os.remove('./installed') + os.remove('./is_setup') os.remove(os.readlink(binary_search_state.STATE_FILE)) os.remove(binary_search_state.STATE_FILE) except OSError: @@ -110,7 +110,7 @@ class BisectingUtilsTest(unittest.TestCase): """Generate [100-1000] object files, and 1-5% of which are bad ones.""" GenObj() - with open('./installed', 'w'): + with open('./is_setup', 'w'): pass try: @@ -127,7 +127,7 @@ class BisectingUtilsTest(unittest.TestCase): except OSError: pass - cleanup_list = ['./installed', + cleanup_list = ['./is_setup', binary_search_state.STATE_FILE, 'noinc_prune_bad', 'noinc_prune_good'] @@ -153,8 +153,8 @@ class BisectingUtilsTest(unittest.TestCase): self.assertEquals(ret, 0) self.check_output() - def test_install_script(self): - os.remove('./installed') + def test_test_setup_script(self): + os.remove('./is_setup') with self.assertRaises(AssertionError): ret = binary_search_state.Run(get_initial_items='./gen_init_list.py', switch_to_good='./switch_to_good.py', @@ -167,19 +167,19 @@ class BisectingUtilsTest(unittest.TestCase): switch_to_good='./switch_to_good.py', switch_to_bad='./switch_to_bad.py', test_script='./is_good.py', - install_script='./install.py', + test_setup_script='./test_setup.py', prune=True, file_args=True) self.assertEquals(ret, 0) self.check_output() - def test_bad_install_script(self): + def test_bad_test_setup_script(self): with self.assertRaises(AssertionError): binary_search_state.Run(get_initial_items='./gen_init_list.py', switch_to_good='./switch_to_good.py', switch_to_bad='./switch_to_bad.py', test_script='./is_good.py', - install_script='./install_bad.py', + test_setup_script='./test_setup_bad.py', prune=True, file_args=True) @@ -281,7 +281,7 @@ class BisectingUtilsTest(unittest.TestCase): switch_to_good='./switch_to_good.py', switch_to_bad='./switch_to_bad.py', test_script='./is_good.py', - install_script='./install.py', + test_setup_script='./test_setup.py', prune=False, file_args=True) bss.DoSearch() @@ -308,7 +308,7 @@ class BisectingUtilsTest(unittest.TestCase): switch_to_good='./switch_to_good_noinc_prune.py', switch_to_bad='./switch_to_bad_noinc_prune.py', test_script='./is_good_noinc_prune.py', - install_script='./install.py', + test_setup_script='./test_setup.py', prune=True, noincremental=True, file_args=True, @@ -362,7 +362,7 @@ class BisectStressTest(unittest.TestCase): ret = binary_search_state.Run(get_initial_items='./gen_init_list.py', switch_to_good='./switch_to_good.py', switch_to_bad='./switch_to_bad.py', - install_script='./install.py', + test_setup_script='./test_setup.py', test_script='./is_good.py', prune=True, file_args=True) @@ -399,8 +399,8 @@ def Main(argv): for _ in range(0, num_tests): suite.addTest(BisectingUtilsTest()) suite.addTest(BisectingUtilsTest('test_arg_parse')) - suite.addTest(BisectingUtilsTest('test_install_script')) - suite.addTest(BisectingUtilsTest('test_bad_install_script')) + suite.addTest(BisectingUtilsTest('test_test_setup_script')) + suite.addTest(BisectingUtilsTest('test_bad_test_setup_script')) suite.addTest(BisectingUtilsTest('test_bad_save_state')) suite.addTest(BisectingUtilsTest('test_save_state')) suite.addTest(BisectingUtilsTest('test_load_state')) diff --git a/binary_search_tool/test/common.py b/binary_search_tool/test/common.py index 382274b9..baac9434 100755 --- a/binary_search_tool/test/common.py +++ b/binary_search_tool/test/common.py @@ -6,8 +6,6 @@ DEFAULT_BAD_OBJECT_NUMBER = 23 OBJECTS_FILE = 'objects.txt' WORKING_SET_FILE = 'working_set.txt' -installed = True - def ReadWorkingSet(): working_set = [] diff --git a/binary_search_tool/test/is_good.py b/binary_search_tool/test/is_good.py index f7cc8af7..bfe9cc32 100755 --- a/binary_search_tool/test/is_good.py +++ b/binary_search_tool/test/is_good.py @@ -10,7 +10,7 @@ import common def Main(): - if not os.path.exists('./installed'): + if not os.path.exists('./is_setup'): return 1 working_set = common.ReadWorkingSet() for w in working_set: diff --git a/binary_search_tool/test/is_good_noinc_prune.py b/binary_search_tool/test/is_good_noinc_prune.py index 9c37db32..5aafd6c2 100755 --- a/binary_search_tool/test/is_good_noinc_prune.py +++ b/binary_search_tool/test/is_good_noinc_prune.py @@ -33,7 +33,7 @@ def Main(): os.remove('noinc_prune_bad') os.remove('noinc_prune_good') - if not os.path.exists('./installed'): + if not os.path.exists('./is_setup'): return 1 for w in working_set: if w == 1: diff --git a/binary_search_tool/test/install.py b/binary_search_tool/test/test_setup.py index 5f721b92..3fb5a23c 100755 --- a/binary_search_tool/test/install.py +++ b/binary_search_tool/test/test_setup.py @@ -1,5 +1,5 @@ #!/usr/bin/python2 -"""Emulate installation of files, is_good.py should fail without this.""" +"""Emulate running of test setup script, is_good.py should fail without this.""" from __future__ import print_function @@ -7,8 +7,8 @@ import sys def Main(): - # create ./installed - with open('./installed', 'w'): + # create ./is_setup + with open('./is_setup', 'w'): pass return 0 diff --git a/binary_search_tool/test/install_bad.py b/binary_search_tool/test/test_setup_bad.py index 8b49a3f8..8d72763e 100755 --- a/binary_search_tool/test/install_bad.py +++ b/binary_search_tool/test/test_setup_bad.py @@ -1,5 +1,5 @@ #!/usr/bin/python2 -"""Emulate installation that fails (i.e. failed flash to device)""" +"""Emulate test setup that fails (i.e. failed flash to device)""" from __future__ import print_function |