summaryrefslogtreecommitdiff
path: root/util/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/run_tests.sh')
-rwxr-xr-xutil/run_tests.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/util/run_tests.sh b/util/run_tests.sh
new file mode 100755
index 0000000000..f8af2dc681
--- /dev/null
+++ b/util/run_tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Copyright 2022 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Runs all the unit tests in the util dir. Uses relative paths, so don't run
+# from any ebuild.
+
+# Show commands being run.
+set -x
+
+# Exit if any command exits non-zero.
+set -e
+
+# cd to the ec directory.
+cd "$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")"/..
+
+# Run pytest
+pytest util "$@"
+
+# Run shell tests
+cd util
+./test-inject-keys.sh