1#!/bin/bash
2#
3#
4# Copyright 2014, NICTA
5#
6# This software may be distributed and modified according to the terms of
7# the BSD 2-Clause license. Note that NO WARRANTY is provided.
8# See "LICENSE_BSD2.txt" for details.
9#
10# @TAG(NICTA_BSD)
11#
12set -e
13echo 'running run_tests script'
14
15# Fetch directory this script is stored in.
16DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
17
18# Run the tests from the script directory.
19cd ${DIR}
20mkdir -p .junit-reports
21
22if (($# >= 0)) && [[ $1 == "--prepared-target" ]]; then
23    TESTDIR=./graph-refine-internal
24else
25    TESTDIR=./
26fi
27
28echo "TESTDIR="$TESTDIR
29
30python ../l4v/misc/regression/run_tests.py --junit-report=.junit-reports/regression.xml --d $TESTDIR
31
32# JUnit parser requires class names
33sed -i -e 's/<testcase classname=""/<testcase classname="wcet_regression"/g' .junit-reports/regression.xml
34
35
36