From f04fc617a0f09731632304d777c8a17b6024b58c Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Thu, 15 Oct 2015 17:42:17 +0300 Subject: [PATCH] Change the output file to be an argument to the expect script. Pass it from the runner. Ignore the output file name --- .gitignore | 2 ++ expect.exp | 4 ++-- runtestsapp.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ddc017468..59f24406e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ obj/ .baseDir.ts .ctags-exclude tags + +TestRunResult.txt diff --git a/expect.exp b/expect.exp index 6b56dedd2..5a084c782 100755 --- a/expect.exp +++ b/expect.exp @@ -8,10 +8,10 @@ #expect "TypeScript compilation complete" #send \003 - +set outfile [lindex $argv 0]; set timeout 600 #spawn (adb logcat | tee ./__TESTRESULT__.txt) -log_file -noappend ./__TESTRESULT__.txt +log_file -noappend $outfile spawn adb logcat expect "=== ALL TESTS COMPLETE ===" send \003 diff --git a/runtestsapp.sh b/runtestsapp.sh index 70b822fb5..ee3af583b 100755 --- a/runtestsapp.sh +++ b/runtestsapp.sh @@ -4,6 +4,7 @@ startdir=$(pwd) emuProcId=".*emulator64-x86" emuAvdName=Api19 androidRuntimePath=/Users/erjan/tns-android.tgz +outfile=./TestRunResult.txt testsAppName=TestsApp pathToApk=./platforms/android/build/outputs/apk/$testsAppName-debug.apk @@ -76,7 +77,7 @@ cd $startdir echo "------------------------------------------------" echo "Waiting for the tests to finish executing..." -time ./expect.exp +time ./expect.exp $outfile pkill $emuProcId && true