build.sh 881 Bytes
Newer Older
1
2
#!/bin/bash
#
3
# Build darshan runtime and util code
4
#
5
6
7
8
9
10
fcount=0
runtime_status=0
util_status=0
runtime_result=""
util_result=""
thedate=$(date)
11

12
13
14
15
16
17
18
cd build/darshan-runtime
make && make install
runtime_status=$?
if [ $runtime_status -ne 0 ]; then
  fcount=$((fcount+1));
  runtime_result="<error type='$runtime_status' message='build failed' />"
fi
19

20
21
22
23
24
25
cd ../../build/darshan-util
make && make install
util_status=$?
if [ $util_status -ne 0 ]; then
  fcount=$((fcount+1));
  util_result="<error type='$util_status' message='build failed' />"
26
27
fi

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cd ../../;

echo "
<testsuites>
  <testsuite name='build' tests='2' failures='$fcount' time='$thedate'>
    <testcase name='darshan-runtime' time='$thedate'>
    $runtime_result
    </testcase>
    <testcase name='darshan-util' time='$thedate'>
    $util_result
    </testcase>
  </testsuite>
</testsuites>
" > build-result.xml

exit $fcount