summaryrefslogtreecommitdiff
path: root/test-art-target-test.sh
blob: 423438043750a441566e2a28dcd4343d1917ceae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
. $PWD/setup-android.sh
sudo chmod -R 777 /tmp/


TEST_ART_COMMAND="test-art-target"
TEST_ART_OUTPUT_DIR=$WORKSPACE/$TEST_ART_COMMAND/
export GTEST_OUTPUT=xml:$TEST_ART_OUTPUT_DIR
MAKE_TARGETS=$TEST_ART_COMMAND
mkdir -p $WORKSPACE/$TEST_ART_COMMAND/

MAKE_START=$(date +%s.%N)
source build/envsetup.sh
lunch armv8-userdebug 
./art/tools/buildbot-build.sh -j8 --target
sudo out/host/linux-x86/bin/adb start-server
./art/tools/setup-buildbot-device.sh

export ART_BUILD_HOST_DEBUG=false
export ART_TEST_ANDROID_ROOT="/data/local/tmp/system"
export ART_TEST_FULL=false
export ART_TEST_INTERPRETER=true
export ART_TEST_KEEP_GOING=true
export ART_TEST_OPTIMIZING=true
export ART_TEST_RUN_TEST_2ND_ARCH=false
export ART_TEST_RUN_TEST_DEBUG=false
export ART_TEST_RUN_TEST_NDEBUG=true
export ART_USE_OPTIMIZING_COMPILER=true
failed=0
make -j4 $MAKE_TARGETS  > $WORKSPACE/build-logs-64.txt 2>&1

if [ $? -ne 0 ]; then
    echo "Error: *** Error make failed"
    cat $WORKSPACE/build-logs-64.txt
    failed=1
fi

echo "YVALUE=`grep "2mPASSED" $WORKSPACE/build-logs-64.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-pass_count-64.txt
echo "YVALUE=`grep "1mFAILED" $WORKSPACE/build-logs-64.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-fail_count-64.txt
echo "YVALUE=`grep "3mSKIPPING" $WORKSPACE/build-logs-64.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-skip_count-64.txt
echo "YVALUE=`grep "2mPASSED" $WORKSPACE/build-logs-64.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-pass_count-64.txt
echo "YVALUE=`grep "1mFAILED" $WORKSPACE/build-logs-64.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-fail_count-64.txt
echo "YVALUE=`grep "3mSKIPPING" $WORKSPACE/build-logs-64.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-skip_count-64.txt
grep -rni "1mFAILED" $WORKSPACE/build-logs-64.txt | sed  "s/.*://g" | sed "s/ .*//g" > ${WORKSPACE}/failing-tests-64.txt
grep -rni "3mSKIPPING" $WORKSPACE/build-logs-64.txt | sed  "s/.*://g" | sed "s/ .*//g" > ${WORKSPACE}/skipped-tests-64.txt

source build/envsetup.sh
lunch aosp_flounder-eng
./art/tools/buildbot-build.sh -j8 --32
./art/tools/setup-buildbot-device.sh

export ART_BUILD_HOST_DEBUG=false
export ART_TEST_ANDROID_ROOT="/data/local/tmp/system"
export ART_TEST_FULL=false
export ART_TEST_INTERPRETER=true
export ART_TEST_KEEP_GOING=true
export ART_TEST_OPTIMIZING=true
export ART_TEST_RUN_TEST_2ND_ARCH=false
export ART_TEST_RUN_TEST_DEBUG=false
export ART_TEST_RUN_TEST_NDEBUG=true
export ART_USE_OPTIMIZING_COMPILER=true

make -j4 $MAKE_TARGETS  > $WORKSPACE/build-logs-32.txt 2>&1

if [ $? -ne 0 ]; then
    echo "Error: *** Error make failed"
    cat $WORKSPACE/build-logs-32.txt
    failed=1
fi

echo "YVALUE=`grep "2mPASSED" $WORKSPACE/build-logs-32.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-pass_count-32.txt
echo "YVALUE=`grep "1mFAILED" $WORKSPACE/build-logs-32.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-fail_count-32.txt
echo "YVALUE=`grep "3mSKIPPING" $WORKSPACE/build-logs-32.txt | grep "gtest" | wc -l`" > ${WORKSPACE}/gtest-skip_count-32.txt
echo "YVALUE=`grep "2mPASSED" $WORKSPACE/build-logs-32.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-pass_count-32.txt
echo "YVALUE=`grep "1mFAILED" $WORKSPACE/build-logs-32.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-fail_count-32.txt
echo "YVALUE=`grep "3mSKIPPING" $WORKSPACE/build-logs-32.txt | grep "run-test" | wc -l`" > ${WORKSPACE}/run-test-skip_count-32.txt
grep -rni "1mFAILED" $WORKSPACE/build-logs-32.txt | sed  "s/.*://g" | sed "s/ .*//g" > ${WORKSPACE}/failing-tests-32.txt
grep -rni "3mSKIPPING" $WORKSPACE/build-logs-32.txt | sed  "s/.*://g" | sed "s/ .*//g" > ${WORKSPACE}/skipped-tests-32.txt


MAKE_END=$(date +%s.%N)

MAKE_TIME=$(echo "$MAKE_END - $MAKE_START" | bc)
echo "YVALUE=${MAKE_TIME}" > ${WORKSPACE}/make_time.txt
echo "YVALUE=${REPO_TIME}" > ${WORKSPACE}/repo_time.txt
ccache -s

if [ $failed=1 ];then
    exit -1
fi