diff options
author | Tuan Ta <qtt2@cornell.edu> | 2018-02-13 09:15:40 -0500 |
---|---|---|
committer | Tuan Ta <qtt2@cornell.edu> | 2018-06-12 21:06:07 +0000 |
commit | 8008ce25e9ff7e82e4bd0b7da041a31dc841057b (patch) | |
tree | c5653e80b7ff723bba7cc679c9257c8be8a3ccb3 /tests/test-progs/pthread/Makefile.x86 | |
parent | 8de76e0f14f70da39dc060b6741d54d1432ff9a8 (diff) | |
download | gem5-8008ce25e9ff7e82e4bd0b7da041a31dc841057b.tar.xz |
tests: add some pthread and std::thread unit tests
This patch adds some pthread and C++11 std::thread unit tests.
Change-Id: I9706b542e5fa927a87c6e8ae2a6330fab7bb5d72
Reviewed-on: https://gem5-review.googlesource.com/8221
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'tests/test-progs/pthread/Makefile.x86')
-rw-r--r-- | tests/test-progs/pthread/Makefile.x86 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/test-progs/pthread/Makefile.x86 b/tests/test-progs/pthread/Makefile.x86 new file mode 100644 index 000000000..7ad89f07f --- /dev/null +++ b/tests/test-progs/pthread/Makefile.x86 @@ -0,0 +1,34 @@ +# x86 - native + +CPP := g++ +OBJDUMP := objdump +CPPFLAGS := -g -O3 -static -std=c++11 +LFLAGS := -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive + +SRC_DIR := ./src +BIN_DIR := ./bin + +TEST_SRC := test_pthread_create_seq.cpp \ + test_pthread_create_para.cpp \ + test_pthread_mutex.cpp \ + test_atomic.cpp \ + test_pthread_cond.cpp \ + test_std_thread.cpp \ + test_std_mutex.cpp \ + test_std_condition_variable.cpp \ + +TEST_BIN := $(patsubst %.cpp,%,$(TEST_SRC)) +TEST_DUMP := $(patsubst %.cpp,%.objdump,$(TEST_SRC)) + +# Rules + +.PHONY: default clean + +default: $(TEST_BIN) + +$(TEST_BIN): + mkdir -p $(BIN_DIR) + $(CPP) $(CPPFLAGS) $(SRC_DIR)/$@.cpp $(LFLAGS) -o $(BIN_DIR)/$@ + +clean: + $(RM) -r $(BIN_DIR)/* |