Skip to content

Commit a66e01f

Browse files
committed
Enforce result
1 parent b97c65c commit a66e01f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/LlmModuleInstrumentationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public void testGenerate() throws IOException, URISyntaxException{
8686

8787
@Test
8888
public void testGenerateAndStop() throws IOException, URISyntaxException{
89-
int seqLen = 32;
9089
mModule.generate(TEST_PROMPT, SEQ_LEN, new LlmCallback() {
9190
@Override
9291
public void onResult(String result) {

scripts/run_android_emulator.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ adb install -t app-debug-androidTest.apk
2626
adb shell mkdir -p /data/local/tmp/llama
2727
adb push model.pte /data/local/tmp/llama
2828
adb push tokenizer.bin /data/local/tmp/llama
29-
adb shell am instrument -w -r com.example.executorchllamademo.test/androidx.test.runner.AndroidJUnitRunner
29+
adb shell am instrument -w -r com.example.executorchllamademo.test/androidx.test.runner.AndroidJUnitRunner >result.txt 2>&1
30+
if [ grep -q FAILURES result.txt ]; then
31+
cat result.txt
32+
exit 1
33+
fi
3034

3135
adb uninstall org.pytorch.executorch.test || true
3236
adb install -t android-test-debug-androidTest.apk
3337

34-
adb shell am instrument -w -r org.pytorch.executorch.test/androidx.test.runner.AndroidJUnitRunner
38+
adb shell am instrument -w -r org.pytorch.executorch.test/androidx.test.runner.AndroidJUnitRunner >result.txt 2>&1
39+
if [ grep -q FAILURES result.txt ]; then
40+
cat result.txt
41+
exit 1
42+
fi

0 commit comments

Comments
 (0)