-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CxxTest
no longer works on macOS runners
#18
Comments
I think the simplest solution is to only run the tests on unix, but run the builds on unix, macOS, and windows. |
I've looked more into Catch. It looks simple enough, and I have done some work figuring out how to integrate it into a makefile build. Consider this file tree
Then the makefile should be # files to pull headers/source or to wite object code
IDIR=src
SDIR=src
ODIR=obj
# compiler and flags
CC=g++ --std=c++14
CFLAGS=-I$(IDIR) -Wall
## specify the needed files, separated as model and main
_MAIN = main
_MODEL = classA classB
# create path to class header/source
MODELDPS = $(patsubst %, $(IDIR)/model/%.hpp, $(_MODEL))
MODELSRC = $(patsubst %, $(SDIR)/model/%.cpp, $(_MODEL))
MAINSRC = $(patsubst %, $(SDIR)/%.cpp, $(_MAIN))
# object files
MODELOBJ = $(patsubst %, $(ODIR)/model/%.o, $(_MODEL))
MAINOBJ = $(patsubst %, $(ODIR)/%.o, $(_MAIN))
# specify code dependencies
MODELDEP = $(MODELDPS) $(MODELSRC)
MAINDEP = $(MAINSRC) $(MODELDEP)
## Main rule for creating the code base
## it will create model and main object files
code: $(MAINOBJ) $(MODELOBJ)
$(CC) -o $@ $^ $(CFLAGS)
## Rules for each subsection -- only update if their dependencies change
$(MODELOBJ): $(ODIR)/model/%.o: $(SDIR)/model/%.cpp $(MODELDEP)| obj/model/
$(CC) -c -o $@ $< $(CFLAGS)
$(MAINOBJ): $(ODIR)/%.o: $(SDIR)/%.cpp $(MAINDEP)| obj/
$(CC) -c -o $@ $< $(CFLAGS)
## create the tests
TEST = $(patsubst %, ./tests/test_%.cpp, $(_MODEL))
tests: code
$(CC) -o ./tests/tests.o $(MAINOBJ) $(MODELOBJ) $(TEST) $(CFLAGS) -l catch2
./tests/tests.o --success
## this rule creates an obj directory if none exists
obj/:
mkdir -p obj
obj/model/:
mkdir -p obj/model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I raised an issue on CxxTest about failing runs on macOS runners. Given their track record of responding in a timely manner to issues, I expect it will never be fixed.
For reasons unknown to me, all tests on github's macOS runners are failing with the following:
As shown, there are multiple syntax errors inside the python script
cxxtest_parser.py
usingis
for comparison of non-None
values, and then a failure to find thecxxtest/TestListener.h
header file.Given several other issues that have occurred with CxxTest, I should consider a new testing framework.
The text was updated successfully, but these errors were encountered: