-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.sh
77 lines (63 loc) · 2.64 KB
/
run_tests.sh
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
EXIT_STATUS=0
DIR_PATH_SDK_REPORT="sdkTestReport"
DIR="sdk/build/reports/tests/testDebugUnitTest"
DIR_CLASSES="sdk/build/reports/tests/testDebugUnitTest/classes"
DIR_CLASSES_PACKAGES="sdk/build/reports/tests/testDebugUnitTest/packages"
checkIfDeleteDirectory() {
if [ -d "$DIR_PATH_SDK_REPORT" ]; then rm -Rf $DIR_PATH_SDK_REPORT;
else mkdir $DIR_PATH_SDK_REPORT
fi
}
copyIndexHtml(){
cp -r $DIR_CLASSES/* sdkTestReport/classes/
cp -r $DIR_CLASSES_PACKAGES/* sdkTestReport/packages/
cat $DIR/index.html >> sdkTestReport/index.html
}
checkIfDeleteDirectory
./gradlew :instreamvideo:testDebugUnitTest --info || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.AdRequestTestSuite --scan || EXIT_STATUS=$?
cp -r $DIR/* sdkTestReport || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.AdResponseInfoTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.AdViewTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.DefaultSettingsTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.MediationTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.MRAIDTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.NativeAdSDKTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.OmidTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml
sleep 6
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.UtAdTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.NativeAdSDKFailedTest --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.NativeRequestTest --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.MARTestSuite --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
sleep 6
wait $!
./gradlew :sdk:testDebugUnitTest --tests com.appnexus.opensdk.suite.Miscellaneous --scan || EXIT_STATUS=$?
copyIndexHtml || EXIT_STATUS=$?
exit $EXIT_STATUS