forked from capablevms/webkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.buildbot-test.sh
56 lines (52 loc) · 1.51 KB
/
.buildbot-test.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
#!/bin/sh
#
# Copyright (c) 2022 Arm Ltd.
# SPDX-License-Identifier: MIT OR Apache-2.0
#
# This is designed to be run on a CHERI target by .buildbot.sh. Notably, it
# expects a directory layout like this:
#
# $PWD
# +-- .buildbot-test.sh (this script)
# +-- builds
# | +-- build-type_debug_backend_cloop
# | | +-- bin
# | | | +-- jsc
# | | +-- lib
# | | +-- libJavaScriptCore.so
# | | ...
# | +-- build-type_debug_backend_tier1asm
# | | ...
# | ...
# +-- sunspider-1.0.1
# ...
echo "$PWD:"
du -hs *
echo "$PWD/builds:"
du -hs builds/*
failures=''
# Run higher tiers first (ls -r). They are most complicated, most likely to
# receive development, and run a lot faster than lower tiers.
for build in $(ls -r builds/); do
for ss in sunspider-*; do
echo "==== $ss on $build ===="
while read name; do
js="$ss/$name.js"
# Recent cheribuilds produce jsc binaries with RUNPATH set, so we don't
# need to specify the library path.
echo "Running: \"builds/$build/bin/jsc\" \"$js\""
if "builds/$build/bin/jsc" "$js"; then
echo " - PASS" >&2
else
failures="${failures} - $build: $ss/$name\n"
echo " - FAIL" >&2
fi
done < $ss/LIST
done
# Run everything (for a given build) before declaring results. This is helpful
# for diagnostic purposes. However, don't run the next build if this happens.
if [ -n "$failures" ]; then
echo -e "Some tests failed:\n$failures" >&2
exit 1
fi
done