From c156b07da6e8550f989919c3a015acdedfe8664f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Oct 2023 13:26:32 +0200 Subject: Adjust to current build environment --- Makefile | 7 +++---- README | 3 +++ site.exp | 23 +++++++++++++++++++++++ systemtest/config/unix.exp | 23 ----------------------- 4 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 site.exp delete mode 100644 systemtest/config/unix.exp diff --git a/Makefile b/Makefile index a58b18c..ee38b53 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PROJECTNAME=minicc VERSION=$(shell dpkg-parsechangelog --show-field Version) DISTROS=base #debian10 ubuntu2004 ubuntu2010 -CXX=clang++-11 +CXX=clang++ #CXX=g++-10 #CXXFLAGS=-O2 -DNDEBUG @@ -14,8 +14,7 @@ CXXFLAGS=-O0 -g -D_DEBUG CXXFLAGS+= -Wall -I. -std=c++20 CXXFLAGS+= -fPIE -DVERSION=\"$(VERSION)\" - -ifeq ($(CXX),clang++-11) +ifeq ($(CXX),clang++) CXXFLAGS+=-stdlib=libc++ endif @@ -31,7 +30,7 @@ LIBS=\ -lboost_regex \ -lpthread -ifeq ($(CXX),clang++-11) +ifeq ($(CXX),clang++) LIBS+= \ -fuse-ld=lld-11 \ -lc++ \ diff --git a/README b/README index 4009a62..c58eb99 100644 --- a/README +++ b/README @@ -7,6 +7,9 @@ Build make clean - Clean all make - Build all make systemtest - Run all system tests +make unittest - Run all unit tests +make test - Run all tests + Run --- diff --git a/site.exp b/site.exp new file mode 100644 index 0000000..1bd9310 --- /dev/null +++ b/site.exp @@ -0,0 +1,23 @@ +proc runtest_exit_code { test_name command_line exit_code } { + + exec ./mcc $command_line.cpp + + spawn $command_line + + expect eof + + exec rm $command_line + + lassign [wait] pid spawnid os_error_flag value + + if {$os_error_flag == 0} { + if {$value == $exit_code} { + pass "$test_name: Returned expected value $value" + } else { + fail "$test_name: Returned bad value $value, expected: $exit_code" + } + } else { + fail "$test_name: errno: $value" + } + +} diff --git a/systemtest/config/unix.exp b/systemtest/config/unix.exp deleted file mode 100644 index 1bd9310..0000000 --- a/systemtest/config/unix.exp +++ /dev/null @@ -1,23 +0,0 @@ -proc runtest_exit_code { test_name command_line exit_code } { - - exec ./mcc $command_line.cpp - - spawn $command_line - - expect eof - - exec rm $command_line - - lassign [wait] pid spawnid os_error_flag value - - if {$os_error_flag == 0} { - if {$value == $exit_code} { - pass "$test_name: Returned expected value $value" - } else { - fail "$test_name: Returned bad value $value, expected: $exit_code" - } - } else { - fail "$test_name: errno: $value" - } - -} -- cgit v1.2.3