132 lines
3.0 KiB
Python
Executable File
132 lines
3.0 KiB
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
#
|
|
# Copyright 2017, CSIRO
|
|
#
|
|
# This software may be distributed and modified according to the terms of
|
|
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
|
|
# See "LICENSE_BSD2.txt" for details.
|
|
#
|
|
# @TAG(NICTA_BSD)
|
|
#
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Settings
|
|
L4V_ARCH_DEFAULT="ARM"
|
|
L4V_ARCH_LIST=["ARM","ARM_HYP","X64"]
|
|
|
|
# Fetch directory this script is stored in.
|
|
DIR=os.path.dirname(os.path.realpath(__file__))
|
|
|
|
# Add repo version of Isabelle to our path.
|
|
os.environ["PATH"] += os.pathsep + DIR
|
|
|
|
# Export L4V_ARCH variable as ARM (Default)
|
|
if not os.environ.has_key("L4V_ARCH"):
|
|
os.environ["L4V_ARCH"] = L4V_ARCH_DEFAULT
|
|
|
|
L4V_ARCH=os.environ["L4V_ARCH"]
|
|
|
|
# Check we are using a known Architecture
|
|
if L4V_ARCH not in L4V_ARCH_LIST:
|
|
sys.exit("Unknown architecture L4V_ARCH=%s" % L4V_ARCH)
|
|
|
|
print "Testing for L4V_ARCH=%s:" % L4V_ARCH
|
|
|
|
# Enable quick_and_dirty mode for various images
|
|
if os.environ.has_key("QUICK_AND_DIRTY"):
|
|
os.environ["AINVS_QUICK_AND_DIRTY"]=1
|
|
os.environ["REFINE_QUICK_AND_DIRTY"]=1
|
|
os.environ["CREFINE_QUICK_AND_DIRTY"]=1
|
|
print "Testing with QUICK_AND_DIRTY"
|
|
|
|
# Lists of excluded tests for diferent archs
|
|
EXCLUDE={}
|
|
EXCLUDE["ARM_HYP"]=[
|
|
"CamkesAdlSpec",
|
|
"CamkesGlueSpec",
|
|
"SimpleSystem",
|
|
"RelyGuarantee",
|
|
"Sep_Algebra",
|
|
"tests-xml-correct",
|
|
"SepTactics",
|
|
"SepTacticsExamples",
|
|
"DBaseRefine",
|
|
"DRefine",
|
|
"Access",
|
|
"InfoFlow",
|
|
"ArmConfidentiality",
|
|
"DPolicy",
|
|
"CamkesCdlRefine",
|
|
"Bisim",
|
|
"DSpec",
|
|
"SepDSpec",
|
|
"DSpecProofs",
|
|
"TakeGrant",
|
|
"ASepSpec",
|
|
"HaskellKernel",
|
|
"SysInit",
|
|
"SysInitExamples",
|
|
"InfoFlowCBase",
|
|
"InfoFlowC",
|
|
"SimplExportAndRefine",
|
|
"CParserTest",
|
|
"CParserTestX64",
|
|
"CParserTools",
|
|
"AutoCorres",
|
|
"CamkesGlueProofs",
|
|
"CamkesDarpaReport",
|
|
"theory_imports",
|
|
"AutoCorresDoc",
|
|
"AutoCorresTest",
|
|
"AutoCorresSEL4"]
|
|
|
|
EXCLUDE["ARM"]=[]
|
|
|
|
EXCLUDE[X64]=[
|
|
"ASepSpec",
|
|
"Access",
|
|
"ArmConfidentiality",
|
|
"AutoCorresSEL4",
|
|
"Bisim",
|
|
"CamkesAdlSpec",
|
|
"CamkesCdlRefine",
|
|
"CamkesDarpaReport",
|
|
"CamkesGlueProofs",
|
|
"CamkesGlueSpec",
|
|
"DBaseRefine",
|
|
"DPolicy",
|
|
"DRefine",
|
|
"DSpec",
|
|
"DSpecProofs",
|
|
"InfoFlow",
|
|
"InfoFlowC",
|
|
"InfoFlowCBase",
|
|
"RelyGuarantee",
|
|
"SepDSpec",
|
|
"SepTactics",
|
|
"SepTacticsExamples",
|
|
"Sep_Algebra",
|
|
"SimplExportAndRefine",
|
|
"SimpleSystem",
|
|
"SysInit",
|
|
"SysInitExamples",
|
|
"TakeGrant"]
|
|
|
|
# Check EXCLUDE is exhaustive over the available architectures
|
|
if not set(L4V_ARCH_LIST) <= set(EXCLUDE.keys()):
|
|
sys.exit("[INTERNAL ERROR] exclusion lists are non-exhaustive")
|
|
|
|
# Run the tests from the script directory.
|
|
os.chdir(DIR)
|
|
|
|
# Arguments:
|
|
args = ['./misc/regression/run_tests.py'] # Script name
|
|
args += [r for t in EXCLUDE[L4V_ARCH] for r in ['-r', t]] # Exclusion list
|
|
args += sys.argv[1:] # Other arguments
|
|
|
|
# Run the thing!!
|
|
os.execvp('./misc/regression/run_tests.py',args)
|