From e45e2f77c9e536f2a72151adeaff958e9a8a4d13 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 4 Feb 2022 14:38:35 -0800 Subject: [PATCH 1/7] Rework regression to use docker. --- .github/workflows/ci.yml | 66 +++++++----- Makefile | 7 +- ...py => 09_sense_amp_array_pbitcell_test.py} | 0 ... => 19_single_bank_global_bitline_test.py} | 0 compiler/tests/21_hspice_delay_test.py | 1 + compiler/tests/21_hspice_setuphold_test.py | 1 + compiler/tests/Makefile | 101 +++++++++--------- 7 files changed, 98 insertions(+), 78 deletions(-) rename compiler/tests/{09_sense_amp_array_test_pbitcell.py => 09_sense_amp_array_pbitcell_test.py} (100%) rename compiler/tests/{19_single_bank_global_bitline.py => 19_single_bank_global_bitline_test.py} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed86160b..ec4f2934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,44 +1,56 @@ name: ci on: [push] jobs: - scn4me_subm: + regress: runs-on: self-hosted steps: - name: Checkout code uses: actions/checkout@v1 - - name: SCMOS test + - name: Docker pull + run: docker pull vlsida/openram-ubuntu:latest + - name: PDK Install run: | - . /home/github-runner/setup-paths.sh export OPENRAM_HOME="${{ github.workspace }}/compiler" - export OPENRAM_TECH="${{ github.workspace }}/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm_temp" + export OPENRAM_TECH="${{ github.workspace }}/technology" + #cd $OPENRAM_HOME/tests + #export PDK_ROOT="${{ github.workspace }}/pdk" + #make pdk + #make install + - name: Regress + run: | + export OPENRAM_HOME="${{ github.workspace }}/compiler" + export OPENRAM_TECH="${{ github.workspace }}/technology" + #cd $OPENRAM_HOME/.. && make pdk && make install + #export OPENRAM_TMP="${{ github.workspace }}/scn4me_subm_temp" #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t scn4m_subm - $OPENRAM_HOME/tests/regress.py -j 24 -t scn4m_subm + #$OPENRAM_HOME/tests/regress.py -j 24 -t scn4m_subm + cd $OPENRAM_HOME/tests + make -j 36 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: - name: scn4me_subm Archives - path: ${{ github.workspace }}/*.zip - freepdk45: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: FreePDK45 test - run: | - . /home/github-runner/setup-paths.sh - export OPENRAM_HOME="${{ github.workspace }}/compiler" - export OPENRAM_TECH="${{ github.workspace }}/technology:/software/PDKs/skywater-tech" - export OPENRAM_TMP="${{ github.workspace }}/freepdk45_temp" - #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 - $OPENRAM_HOME/tests/regress.py -j 24 -t freepdk45 - - name: Archive - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: FreePDK45 Archives - path: ${{ github.workspace }}/*.zip + name: Regress Archives + path: ${{ github.workspace }}/compiler/tests/results/*.zip +# freepdk45: +# runs-on: self-hosted +# steps: +# - name: Checkout code +# uses: actions/checkout@v1 +# - name: FreePDK45 test +# run: | +# . /home/github-runner/setup-paths.sh +# export OPENRAM_HOME="${{ github.workspace }}/compiler" +# export OPENRAM_TECH="${{ github.workspace }}/technology:/software/PDKs/skywater-tech" +# export OPENRAM_TMP="${{ github.workspace }}/freepdk45_temp" +# #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t freepdk45 +# $OPENRAM_HOME/tests/regress.py -j 24 -t freepdk45 +# - name: Archive +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: FreePDK45 Archives +# path: ${{ github.workspace }}/*.zip # coverage_stats: # if: ${{ always() }} # needs: [scn4me_subm, freepdk45] diff --git a/Makefile b/Makefile index af52eb2f..1f603a41 100644 --- a/Makefile +++ b/Makefile @@ -186,10 +186,11 @@ mount: @docker run -it -v $(TOP_DIR):/openram \ -v $(SKY130_PDK):$(SKY130_PDK) \ -e PDK_ROOT=$(PDK_ROOT) \ - -e OPENRAM_HOME=/openram/compiler \ - -e OPENRAM_TECH=/openram/technology \ + -e OPENRAM_HOME=/openram/compiler \ + -e OPENRAM_TECH=/openram/technology \ + -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro \ --user $(UID):$(GID) \ - vlsida/openram-ubuntu:latest + vlsida/openram-ubuntu:latest .PHONY: mount clean: diff --git a/compiler/tests/09_sense_amp_array_test_pbitcell.py b/compiler/tests/09_sense_amp_array_pbitcell_test.py similarity index 100% rename from compiler/tests/09_sense_amp_array_test_pbitcell.py rename to compiler/tests/09_sense_amp_array_pbitcell_test.py diff --git a/compiler/tests/19_single_bank_global_bitline.py b/compiler/tests/19_single_bank_global_bitline_test.py similarity index 100% rename from compiler/tests/19_single_bank_global_bitline.py rename to compiler/tests/19_single_bank_global_bitline_test.py diff --git a/compiler/tests/21_hspice_delay_test.py b/compiler/tests/21_hspice_delay_test.py index 584e705f..4f8ba8ec 100755 --- a/compiler/tests/21_hspice_delay_test.py +++ b/compiler/tests/21_hspice_delay_test.py @@ -15,6 +15,7 @@ from globals import OPTS from sram_factory import factory import debug +@unittest.skip("SKIPPING 21_hspice_delay_test") class timing_sram_test(openram_test): def runTest(self): diff --git a/compiler/tests/21_hspice_setuphold_test.py b/compiler/tests/21_hspice_setuphold_test.py index 9154502e..76f47d1a 100755 --- a/compiler/tests/21_hspice_setuphold_test.py +++ b/compiler/tests/21_hspice_setuphold_test.py @@ -14,6 +14,7 @@ import globals from globals import OPTS +@unittest.skip("SKIPPING 21_hspice_setuphold_test") class timing_setup_test(openram_test): def runTest(self): diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index 6933f165..eca04336 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -1,16 +1,22 @@ TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))../..) include $(TOP_DIR)/openram.mk -.DEFAULT_GOAL := regress +.DEFAULT_GOAL := all -ARGS ?= "-k" +ARGS ?= +TECH ?= scn4m_subm +TECHS = scn4m_subm freepdk45 +# sky130 -TEST_DIR = $(TOP_DIR)/compiler/tests -TEST_SRCS=$(sort $(notdir $(wildcard $(TEST_DIR)/*_test.py))) -TEST_DIRS=$(basename $(TEST_SRCS)) -TEST_STAMPS=$(addsuffix .ok,$(TEST_DIRS)) +TEST_DIR = $(TOP_DIR)/compiler/tests +TEST_SRCS = $(sort $(notdir $(wildcard $(TEST_DIR)/*_test.py))) +TEST_BASES = $(basename $(TEST_SRCS)) +TEST_STAMPS= $(addsuffix .ok,$(TEST_BASES)) -TEST_BROKEN := \ +OPENRAM_DIR = /openram/compiler/tests +RESULTS_DIR = $(OPENRAM_DIR)/results + +TEST_BROKEN = \ 50_riscv_1k_1rw1r_func_test.py \ 50_riscv_1k_1rw_func_test.py \ 50_riscv_1rw1r_func_test.py \ @@ -29,66 +35,65 @@ TEST_BROKEN := \ WORKING_TEST_STAMPS=$(filter-out $(addsuffix .ok, (TEST_BROKEN)), $(TEST_STAMPS)) -$(TEST_DIRS): - @$(MAKE) --no-print-directory $@.ok -tests: - @echo "Running the following tests" - @for S in $(WORKING_TEST_STAMPS); do echo " - $$S"; done - @sleep 5 - @$(MAKE) $(WORKING_TEST_STAMPS) -.PHONY: +gettech = $(word 1,$(subst /, ,$*)) +getfile = $(word 2,$(subst /, ,$*)) +WORKING_TECH_TEST_STAMPS=$(foreach T, $(TECHS),$(addprefix $T/,$(WORKING_TEST_STAMPS))) -%.ok: %.py - @echo "Running $*" - @mkdir -p $(TOP_DIR)/compiler/tests/results/$* +all: $(WORKING_TECH_TEST_STAMPS) +.PHONY: all + +# Targets for each individual test +# e.g. make 04_pinv_1x_test +$(TEST_BASES): +# @echo "Running $(TECH) $@ ... " + @$(MAKE) --no-print-directory $(TECH)/$@.ok +.PHONY: $(TEST_BASES) + +# To run a test in a given technology +%.ok: +# @echo "Running $(gettech) $(getfile) ... " + @mkdir -p results/$*/tmp @docker run \ -v $(TOP_DIR):/openram \ -v $(FREEPDK45):/pdk/freepdk45\ -v $(PDK_ROOT):/pdk \ + -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro \ --user $(UID):$(GID) \ + -e OPENRAM_TMP=$(OPENRAM_DIR)/results/$*/tmp \ vlsida/openram-ubuntu:latest \ - sh -c ". ~/.bashrc && python3 -u /openram/compiler/tests/$*.py $(ARGS) && touch $@" - + sh -c ". /home/cad-user/.bashrc && python3 -u $(OPENRAM_DIR)/$(getfile).py \ + -t $(gettech) -k $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok" + @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" || echo "$* ... FAIL!" .DELETE_ON_ERROR: $(TEST_STAMPS) -TECHS := scn4m_subm freepdk45 -#sky130 - -$(TECHS): - docker run \ - -v $(TOP_DIR):/openram \ - -v $(FREEPDK45):/pdk/freepdk45 \ - -v $(PDK_ROOT):/pdk \ - --user $(UID):$(GID) \ - -e OPENRAM_TMP=/openram/compiler/tests/tmp_$@/$* \ - vlsida/openram-ubuntu:latest \ - sh -c ". ~/.bashrc && python3 -u /openram/compiler/tests/regress.py $(ARGS) -t $@" -.PHONY: $(TECHS) - -regress: $(TECHS) -.PHONY: regress - -foo: - docker run \ - -v $(TOP_DIR):/openram \ - -v $(FREEPDK45):/pdk/freepdk45 \ - -v $(PDK_ROOT):/pdk \ - --user $(UID):$(GID) \ - vlsida/openram-ubuntu:latest \ - sh -c ". ~/.bashrc && env" -.PHONY: foo +# This would use the regress.py script to run in parallel instead of +# the Makefile. +#$(TECHS): +# @echo "Running $*" +# docker run \ +# -v $(TOP_DIR):/openram \ +# -v $(FREEPDK45):/pdk/freepdk45 \ +# -v $(PDK_ROOT):/pdk \ +# --user $(UID):$(GID) \ +# -e OPENRAM_TMP=$(OPENRAM_DIR)/results/$@ \ +# vlsida/openram-ubuntu:latest \ +# sh -c ". /home/cad-user/.bashrc && python3 -u $(OPENRAM_DIR)/regress.py -t $@ $(ARGS)" +#.PHONY: $(TECHS) +#regress: $(TECHS) +#.PHONY: regress +# Mount environment for debug mount: docker run -it \ -v $(TOP_DIR):/openram \ -v $(FREEPDK45):/pdk/freepdk45 \ -v $(PDK_ROOT):/pdk \ + -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro \ --user $(UID):$(GID) \ vlsida/openram-ubuntu:latest .PHONY: mount clean: - @rm -rf $(TEST_STAMPS) - @rm -rf $(TEST_DIRS) + @rm -rf $(TOP_DIR)/compiler/tests/results .PHONE: clean From d716a1c36180e38af9f5dbbeee28ac0a9e313c21 Mon Sep 17 00:00:00 2001 From: mrg Date: Sat, 5 Feb 2022 07:50:06 -0800 Subject: [PATCH 2/7] Don't stop on fail, archive all results, create .bad file on fail. --- .github/workflows/ci.yml | 4 ++-- compiler/tests/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec4f2934..578a13f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,13 @@ jobs: #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t scn4m_subm #$OPENRAM_HOME/tests/regress.py -j 24 -t scn4m_subm cd $OPENRAM_HOME/tests - make -j 36 + make -k -j 36 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: Regress Archives - path: ${{ github.workspace }}/compiler/tests/results/*.zip + path: ${{ github.workspace }}/compiler/tests/results/* # freepdk45: # runs-on: self-hosted # steps: diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index eca04336..a20f61f3 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -63,11 +63,11 @@ $(TEST_BASES): -e OPENRAM_TMP=$(OPENRAM_DIR)/results/$*/tmp \ vlsida/openram-ubuntu:latest \ sh -c ". /home/cad-user/.bashrc && python3 -u $(OPENRAM_DIR)/$(getfile).py \ - -t $(gettech) -k $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok" + -t $(gettech) -k $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok || touch $(OPENRAM_DIR)/results/$*.bad" @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" || echo "$* ... FAIL!" .DELETE_ON_ERROR: $(TEST_STAMPS) -# This would use the regress.py script to run in parallel instead of +# This would use the regress.py script to run in parallel instead of # the Makefile. #$(TECHS): # @echo "Running $*" From 723523275eb4f5f93a1c80a3da17d7695f12e18d Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Feb 2022 09:04:38 -0800 Subject: [PATCH 3/7] Add Xyce to docker image --- .github/workflows/ci.yml | 2 +- docker/Dockerfile | 78 ++++++++++++++++++++++++++++++++-------- docker/set-paths.sh | 4 +-- 3 files changed, 65 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 578a13f3..36ab8aae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: #python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 12 -t scn4m_subm #$OPENRAM_HOME/tests/regress.py -j 24 -t scn4m_subm cd $OPENRAM_HOME/tests - make -k -j 36 + make -k -j 48 - name: Archive if: ${{ failure() }} uses: actions/upload-artifact@v2 diff --git a/docker/Dockerfile b/docker/Dockerfile index 9503fed1..14950d19 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -67,30 +67,78 @@ RUN ./configure \ && make install RUN rm -rf /root/netgen -#ARG XYCE_COMMIT=b7bb12d81f11d8b50141262537299b09d64b5565 -#ARG TRILINOS_COMIT= +### Trilinos ### +ARG TRILINOS_COMMIT=trilinos-release-12-12-1 +WORKDIR /root +RUN apt-get install --no-install-recommends -y cmake libfftw3-dev mpich libblas-dev liblapack-dev libsuitesparse-dev libfl-dev openmpi-bin libopenmpi-dev gfortran +RUN git clone --depth 1 --branch ${TRILINOS_COMMIT} https://github.com/trilinos/Trilinos.git +RUN mkdir /root/Trilinos/build +WORKDIR /root/Trilinos/build +RUN cmake \ + -G "Unix Makefiles" \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_CXX_COMPILER=mpic++ \ + -DCMAKE_Fortran_COMPILER=mpif77 \ + -DCMAKE_CXX_FLAGS="-O3 -fPIC" \ + -DCMAKE_C_FLAGS="-O3 -fPIC" \ + -DCMAKE_Fortran_FLAGS="-O3 -fPIC" \ + -DCMAKE_INSTALL_PREFIX=/usr/local/XyceLibs/Parallel \ + -DCMAKE_MAKE_PROGRAM="make" \ + -DTrilinos_ENABLE_NOX=ON \ + -DNOX_ENABLE_LOCA=ON \ + -DTrilinos_ENABLE_EpetraExt=ON \ + -DEpetraExt_BUILD_BTF=ON \ + -DEpetraExt_BUILD_EXPERIMENTAL=ON \ + -DEpetraExt_BUILD_GRAPH_REORDERINGS=ON \ + -DTrilinos_ENABLE_TrilinosCouplings=ON \ + -DTrilinos_ENABLE_Ifpack=ON \ + -DTrilinos_ENABLE_ShyLU=ON \ + -DTrilinos_ENABLE_Isorropia=ON \ + -DTrilinos_ENABLE_AztecOO=ON \ + -DTrilinos_ENABLE_Belos=ON \ + -DTrilinos_ENABLE_Teuchos=ON \ + -DTeuchos_ENABLE_COMPLEX=ON \ + -DTrilinos_ENABLE_Amesos=ON \ + -DAmesos_ENABLE_KLU=ON \ + -DTrilinos_ENABLE_Sacado=ON \ + -DTrilinos_ENABLE_Kokkos=ON \ + -DTrilinos_ENABLE_Zoltan=ON \ + -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF \ + -DTrilinos_ENABLE_CXX11=ON \ + -DTPL_ENABLE_AMD=ON \ + -DAMD_LIBRARY_DIRS="/usr/lib" \ + -DTPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \ + -DTPL_ENABLE_BLAS=ON \ + -DTPL_ENABLE_LAPACK=ON \ + -DTPL_ENABLE_MPI=ON \ + /root/Trilinos +RUN make -j 4 +RUN make install + +ARG XYCE_COMMIT=b7bb12d81f11d8b50141262537299b09d64b5565 +WORKDIR /root +RUN git clone https://github.com/Xyce/Xyce.git +WORKDIR /root/Xyce +RUN git checkout ${XYCE_COMMIT} +RUN ./bootstrap +RUN mkdir /root/Xyce/build +WORKDIR /root/Xyce/build +RUN ../configure CXXFLAGS="-O3 -std=c++11" \ + ARCHDIR="/usr/local/XyceLibs/Parallel" \ + CPPFLAGS="-I/usr/include/suitesparse" \ + --enable-mpi CXX=mpicxx CC=mpicc F77=mpif77 \ + --prefix=/usr/local/Xyce/Parallel --enable-shared --enable-xyce-shareable +RUN make -j 4 install ### CLEAN UP ### # Remove development tools to save space -RUN apt-get remove -y build-essential autoconf automake libtool bison flex tcl-dev tk-dev +RUN apt-get remove -y build-essential autoconf automake libtool bison flex tcl-dev tk-dev cmake # Cleanup to save some space RUN apt-get clean RUN rm -rf /var/lib/apt/lists/* # ### SET UP A GENERIC USER ### -# WORKDIR /p -# RUN echo "cd ~" >> /etc/skel/.bashrc -# RUN echo "source /set-paths.sh" >> /etc/skel/.bashrc -# ADD set-paths.sh /set-paths.sh -# RUN chmod 755 /set-paths.sh - -### ADD ENTRY POINT ### -# COPY entrypoint.sh /usr/local/bin/entrypoint.sh -# RUN chmod 755 /usr/local/bin/entrypoint.sh -# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] -# CMD ["/bin/bash"] - RUN mkdir /home/cad-user RUN useradd cad-user RUN chown -R cad-user /home/cad-user diff --git a/docker/set-paths.sh b/docker/set-paths.sh index 40bfaeb8..1cebef48 100644 --- a/docker/set-paths.sh +++ b/docker/set-paths.sh @@ -1,15 +1,13 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin -export SWROOT=/software - # Klayout export KLAYOUT_HOME=/usr/local/klayout export PATH=$PATH:$KLAYOUT_HOME export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$KLAYOUT_HOME # Xyce -export XYCE_HOME=$SWROOT/Xyce/Parallel +export XYCE_HOME=/usr/local/Xyce/Parallel export XYCE_PATH=$XYCE_HOME/bin export PATH=$PATH:$XYCE_PATH export XYCE_LIB=$XYCE_HOME/lib From 8653b882062603f56585740b46b54510d82ae4f6 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Feb 2022 09:06:20 -0800 Subject: [PATCH 4/7] Remove working temp directories --- compiler/tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index a20f61f3..2f6f36c4 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -64,7 +64,7 @@ $(TEST_BASES): vlsida/openram-ubuntu:latest \ sh -c ". /home/cad-user/.bashrc && python3 -u $(OPENRAM_DIR)/$(getfile).py \ -t $(gettech) -k $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok || touch $(OPENRAM_DIR)/results/$*.bad" - @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" || echo "$* ... FAIL!" + @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" && rm -rf $(OPENRAM_DIR)/results/$* || echo "$* ... FAIL!" .DELETE_ON_ERROR: $(TEST_STAMPS) # This would use the regress.py script to run in parallel instead of From 93c6565b66bf1124b68a2a2fc62e9cdb2c52809c Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Feb 2022 09:13:36 -0800 Subject: [PATCH 5/7] Add total failure of tests --- compiler/tests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index 2f6f36c4..c86a6fa5 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -41,6 +41,7 @@ getfile = $(word 2,$(subst /, ,$*)) WORKING_TECH_TEST_STAMPS=$(foreach T, $(TECHS),$(addprefix $T/,$(WORKING_TEST_STAMPS))) all: $(WORKING_TECH_TEST_STAMPS) + @test -f $(TOP_DIR)/compiler/tests/results/*.bad && echo "Regression had a failure." && exit 1 || "Regression passed." .PHONY: all # Targets for each individual test From 89688de3cf9c2a8bf06a8c9e6e8bc6ddb53226c9 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Feb 2022 09:48:30 -0800 Subject: [PATCH 6/7] Remove outside of docker space --- compiler/tests/21_ngspice_delay_global_test.py | 1 + compiler/tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/tests/21_ngspice_delay_global_test.py b/compiler/tests/21_ngspice_delay_global_test.py index 78b764f4..b71313f8 100755 --- a/compiler/tests/21_ngspice_delay_global_test.py +++ b/compiler/tests/21_ngspice_delay_global_test.py @@ -16,6 +16,7 @@ from sram_factory import factory import debug +@unittest.skip("SKIPPING 21_ngspice_delay_global_test") class timing_sram_test(openram_test): def runTest(self): diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index c86a6fa5..ac0c2ff2 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -65,7 +65,7 @@ $(TEST_BASES): vlsida/openram-ubuntu:latest \ sh -c ". /home/cad-user/.bashrc && python3 -u $(OPENRAM_DIR)/$(getfile).py \ -t $(gettech) -k $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok || touch $(OPENRAM_DIR)/results/$*.bad" - @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" && rm -rf $(OPENRAM_DIR)/results/$* || echo "$* ... FAIL!" + @test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" && rm -rf $(TOP_DIR)/compiler/tests/results/$* || echo "$* ... FAIL!" .DELETE_ON_ERROR: $(TEST_STAMPS) # This would use the regress.py script to run in parallel instead of From ee97d87bdf6941384dbe03b460e6dfeaa1780c36 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Feb 2022 12:36:22 -0800 Subject: [PATCH 7/7] Fix total regress pass or fail check. --- compiler/tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/tests/Makefile b/compiler/tests/Makefile index ac0c2ff2..2fb7f4e1 100644 --- a/compiler/tests/Makefile +++ b/compiler/tests/Makefile @@ -41,7 +41,7 @@ getfile = $(word 2,$(subst /, ,$*)) WORKING_TECH_TEST_STAMPS=$(foreach T, $(TECHS),$(addprefix $T/,$(WORKING_TEST_STAMPS))) all: $(WORKING_TECH_TEST_STAMPS) - @test -f $(TOP_DIR)/compiler/tests/results/*.bad && echo "Regression had a failure." && exit 1 || "Regression passed." + @ls $(TOP_DIR)/compiler/tests/results/*.bad 1> /dev/null 2>&1 && echo "REGRESSION FAIL" && exit 1 || echo "REGRESSION PASS" .PHONY: all # Targets for each individual test