touchtests: display error when adding test-case to non-existing platform
It did not complain, but as the platform.dat file is missing the
trimming tool will crash without a proper error message.
BUG=chromium-os:37856
TEST=touchtests bla -c ... vs touchtests lumpy/bla -c
Change-Id: I69f6d139123681dcdbaca221449be6f9ee9bd68d
Reviewed-on: https://gerrit.chromium.org/gerrit/43930
Commit-Queue: Dennis Kempin <denniskempin@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Tested-by: Dennis Kempin <denniskempin@chromium.org>
diff --git a/framework/src/main.py b/framework/src/main.py
index dc417f7..e90f0db 100644
--- a/framework/src/main.py
+++ b/framework/src/main.py
@@ -173,8 +173,8 @@
# determine test name from activity_log name
factory = TestFactory(os.environ["TESTS_DIR"])
case = factory.CreateTest(testname, activity_log, event_log)
-
- print "Test \"" + case.name + "\" created"
+ if case:
+ print "Test \"" + case.name + "\" created"
def Main():
"""