Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/24543 )

Change subject: tests,misc: Created presubmit.yaml Google Cloud Build files
......................................................................

tests,misc: Created presubmit.yaml Google Cloud Build files

This will replicate kokoro on Google Cloud services. At present, this
can be run via execution of `gcloud builds submit --config
--machine=n1-highcpu-8 cloudbuild_presubmit.yaml` (the `n1-highcpu-8`
machine is needed to complete execution in a reasonable time, i.e., in
under 4 hours).

The `hello_goodbye_test-NULL-opt` and
`hello_goodbye_test-NULL-opt-MatchStdout` tests fail on Google Cloud for
an unknown reason. They have therefore been added to `.testignore`. A Jira
issue has been created to fix this:
https://gem5.atlassian.net/browse/GEM5-273

Jira: https://gem5.atlassian.net/browse/GEM5-271
Change-Id: I5a71ef7fdbe5546b4e6970e4f4641f9e14cc640b
---
A cloudbuild_presubmit.yaml
A tests/gem5/.testignore
A tests/scripts/system_test_run.sh
A tests/scripts/unit_test_run.sh
A util/dockerfiles/Dockerfile_presubmit
5 files changed, 56 insertions(+), 0 deletions(-)



diff --git a/cloudbuild_presubmit.yaml b/cloudbuild_presubmit.yaml
new file mode 100644
index 0000000..7672e65
--- /dev/null
+++ b/cloudbuild_presubmit.yaml
@@ -0,0 +1,14 @@
+steps:
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build', '-t', 'ubuntu-18.04-build', '-f',
+             'util/dockerfiles/Dockerfile_presubmit', '.']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['container', 'run', 'ubuntu-18.04-build',
+             './tests/scripts/unit_test_run.sh']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['container', 'run' ,'ubuntu-18.04-build',
+             './tests/scripts/system_test_run.sh', 'quick', '4']
+
+timeout: 18000s # 5 Hours
diff --git a/tests/gem5/.testignore b/tests/gem5/.testignore
new file mode 100644
index 0000000..c5cff71
--- /dev/null
+++ b/tests/gem5/.testignore
@@ -0,0 +1,2 @@
+hello_goodbye_test-NULL-opt-MatchStdout
+hello_goodbye_test-NULL-opt
diff --git a/tests/scripts/system_test_run.sh b/tests/scripts/system_test_run.sh
new file mode 100755
index 0000000..391af0a
--- /dev/null
+++ b/tests/scripts/system_test_run.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+LENGTH=""
+if [ $# -ge 1 ]; then
+    LENGTH="$1"
+else
+    >&2 echo "Length ('quick' or 'long') not specified"
+fi
+
+THREADS=1
+if [ $# -eq 2 ]; then
+    THREADS="$2"
+fi
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+cd "${DIR}/.."
+
+python main.py run -j${THREADS} --length "${LENGTH}"
+status=$?
+
+if [ "$status" -ne "0" ]; then
+    cat .testing-results/results.xml
+fi
+
+exit ${status}
diff --git a/tests/scripts/unit_test_run.sh b/tests/scripts/unit_test_run.sh
new file mode 100755
index 0000000..1f89fdc
--- /dev/null
+++ b/tests/scripts/unit_test_run.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+cd "${DIR}/../.."
+
+scons build/NULL/unittests.opt
diff --git a/util/dockerfiles/Dockerfile_presubmit b/util/dockerfiles/Dockerfile_presubmit
new file mode 100644
index 0000000..93c7cfd
--- /dev/null
+++ b/util/dockerfiles/Dockerfile_presubmit
@@ -0,0 +1,7 @@
+FROM ubuntu:18.04
+RUN apt -y update && apt -y upgrade && apt -y install build-essential git m4 \
+scons zlib1g zlib1g-dev libprotobuf-dev protobuf-compiler libprotoc-dev \
+libgoogle-perftools-dev python-dev libboost-all-dev python python-pip && \
+pip install six
+WORKDIR /src/
+COPY . .

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24543
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I5a71ef7fdbe5546b4e6970e4f4641f9e14cc640b
Gerrit-Change-Number: 24543
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to