Fix broken cros_fuzz_unittest.py
BUG=None
TEST=pytest scripts/cros_fuzz_unittest.py::RunSysrootCommandTest
Change-Id: I495aee096743add9bfd66ef182d58a4bc31adfb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2098649
Tested-by: Greg Edelston <gredelston@google.com>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Commit-Queue: Greg Edelston <gredelston@google.com>
diff --git a/scripts/cros_fuzz_unittest.py b/scripts/cros_fuzz_unittest.py
index b7b084c..527b4e0 100644
--- a/scripts/cros_fuzz_unittest.py
+++ b/scripts/cros_fuzz_unittest.py
@@ -278,8 +278,8 @@
def testRunSysrootCommand(self):
"""Tests RunSysrootCommand creates a proper command to run in sysroot."""
command = ['./fuzz', '-rss_limit_mb=4096']
- cros_fuzz.RunSysrootCommand(command)
sysroot_path = _SetPathToSysroot()
+ cros_fuzz.RunSysrootCommand(command)
expected_command = ['sudo', '--', 'chroot', sysroot_path]
expected_command.extend(command)
self.assertCommandCalled(expected_command, debug_level=logging.DEBUG)