Skip to content

Commit e706fa7

Browse files
mruby: adjust run_test.sh (#14172)
Signed-off-by: David Korczynski <david@adalogics.com>
1 parent e9f7bd7 commit e706fa7

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

projects/mruby/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -eu
1+
#!/bin/bash -eux
22
# Copyright 2019 Google Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,8 @@
2020
cd $SRC/mruby
2121
export LD=$CC
2222
export LDFLAGS="$CFLAGS"
23-
rake -m test
23+
rake all
24+
rake test
2425

2526
# build fuzzers
2627
FUZZ_TARGET=$SRC/mruby/oss-fuzz/mruby_fuzzer.c

projects/mruby/run_tests.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,26 @@
1515
#
1616
################################################################################
1717

18+
(
1819
export LD=$CC
1920
export LDFLAGS="$CFLAGS"
2021
cd $SRC/mruby
21-
rake -m test
22+
rake test > /tmp/test.out 2>&1
23+
)
24+
25+
# There are two test runs, each of which executes many tests. Neither of these
26+
# must have crashing tests and that they have successful tests as well.
27+
# For the first batch We expect 165x tests to succeed and some tests skipped,
28+
# and 100 for the second batch.
29+
# I suspect the skipping causes
30+
# rake to return an error code. However, in normal circumastances we see
31+
# 9 tests skipped.
32+
grep "OK: 165" /tmp/test.out
33+
grep "OK: 100" /tmp/test.out
34+
35+
if [[ `grep "Crash: 0" /tmp/test.out | wc -l` != '2' ]]; then
36+
exit 1
37+
fi
38+
if [[ `grep "KO: 0" /tmp/test.out | wc -l` != '2' ]]; then
39+
exit 1
40+
fi

0 commit comments

Comments
 (0)