Left: | ||
Right: |
OLD | NEW |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # Copyright (c) 2012 Google Inc. | 3 # Copyright (c) 2012 Google Inc. |
4 # All rights reserved. | 4 # All rights reserved. |
5 # | 5 # |
6 # Redistribution and use in source and binary forms, with or without | 6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are | 7 # modification, are permitted provided that the following conditions are |
8 # met: | 8 # met: |
9 # | 9 # |
10 # * Redistributions of source code must retain the above copyright | 10 # * Redistributions of source code must retain the above copyright |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 | 45 |
46 if [ -z "$TEST_PROGRAM" ]; then | 46 if [ -z "$TEST_PROGRAM" ]; then |
47 panic "No test program/script name on the command-line!" | 47 panic "No test program/script name on the command-line!" |
48 fi | 48 fi |
49 | 49 |
50 if [ ! -f "$TEST_PROGRAM" ]; then | 50 if [ ! -f "$TEST_PROGRAM" ]; then |
51 panic "Can't find test program/script: $TEST_PROGRAM" | 51 panic "Can't find test program/script: $TEST_PROGRAM" |
52 fi | 52 fi |
53 | 53 |
54 # Create test directory on the device | 54 # Create test directory on the device |
55 TEST_DIR=/data/local/tmp/test-google-breakpad | 55 TEST_DIR=/data/local/tmp/test-google-breakpad-$$ |
56 adb_shell mkdir "$TEST_DIR" || panic "Can't create test directory on device" | 56 adb_shell mkdir "$TEST_DIR" || panic "Can't create test directory on device: $TE ST_DIR" |
Mark Mentovai
2013/12/13 14:24:28
This goes past 80 columns. Wrap it.
digit
2013/12/13 15:40:19
Done.
| |
57 | 57 |
58 # Ensure that it is always removed when the script exits. | 58 # Ensure that it is always removed when the script exits. |
59 clean_test_dir () { | 59 clean_test_dir () { |
60 # Don't care about success/failure, use '$ADB shell' directly. | 60 # Don't care about success/failure, use '$ADB shell' directly. |
61 adb_shell rm -r "$TEST_DIR" | 61 adb_shell rm -r "$TEST_DIR" |
62 } | 62 } |
63 | 63 |
64 atexit clean_test_dir | 64 atexit clean_test_dir |
65 | 65 |
66 TEST_PROGRAM_NAME=$(basename "$TEST_PROGRAM") | 66 TEST_PROGRAM_NAME=$(basename "$TEST_PROGRAM") |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 done | 121 done |
122 | 122 |
123 # Copy test program to device | 123 # Copy test program to device |
124 adb_install "$TEST_PROGRAM" "$TEST_DIR" | 124 adb_install "$TEST_PROGRAM" "$TEST_DIR" |
125 | 125 |
126 # Run it | 126 # Run it |
127 adb_shell "cd $TEST_DIR && LD_LIBRARY_PATH=. ./$TEST_PROGRAM_NAME $@" | 127 adb_shell "cd $TEST_DIR && LD_LIBRARY_PATH=. ./$TEST_PROGRAM_NAME $@" |
128 | 128 |
129 # Note: exiting here will call cleanup_exit which will remove the temporary | 129 # Note: exiting here will call cleanup_exit which will remove the temporary |
130 # files from the device. | 130 # files from the device. |
OLD | NEW |