Browse Source

tests: Simplify setup.

From gtest-parallel only a single file is used, which is not even required to
be installed in any way. Thus instead of asking the users to clone the repo,
simply download the one file as part of the Makefile.
doxygen_doc
Hartmut Goebel 1 year ago
parent
commit
09143dce40
3 changed files with 12 additions and 16 deletions
  1. +1
    -0
      .gitignore
  2. +6
    -3
      test/Makefile
  3. +5
    -13
      test/README.md

+ 1
- 0
.gitignore View File

@ -55,6 +55,7 @@ trustdb.gpg
.cache
__pycache__
*.pyc
test/gtest_parallel.py
test/python_tests/test?
test/pEp_test_home
test/TestDriver


+ 6
- 3
test/Makefile View File

@ -7,7 +7,7 @@ HERE:=$(CURDIR)
GTEST_SRC_DIR:=/usr/src/gtest
GTEST_INC_DIR:=$(GTEST_SRC_DIR)/include
GTEST_PL:=$(HOME)/src/gtest-parallel/gtest_parallel.py
GTEST_PL:=gtest_parallel.py
include ../Makefile.conf # This should import changed values for the above from
# local.conf
@ -83,9 +83,12 @@ endif
.PHONY: all clean test
all:
all: gtest_parallel.py
make $(TARGET)
gtest_parallel.py:
wget https://raw.githubusercontent.com/google/gtest-parallel/master/gtest_parallel.py
%.d: %.cc
$(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $< \
| sed -e 's,\($*\)\.o[ :]*,\1.o $@: ,g' > $@
@ -102,7 +105,7 @@ test: all
clean:
$(RM) $(TARGET) $(TARGET).o $(TARGET).d $(OBJS) \
$(notdir $(basename $(OBJS))) $(DEPS)
$(notdir $(basename $(OBJS))) $(DEPS) gtest_parallel.py
$(RM) -rf ./pEp_test_home/*
# If only the target 'clean' is given, do not generate and include the


+ 5
- 13
test/README.md View File

@ -17,14 +17,12 @@ In addition to the engine requirements, you will need:
* `cmake`
* `python3`
* `git` (for getting the `gtest-parallel` repository, unless you grab the
tarball from somewhere)
* `wget` (for getting the `gtest-parallel.py` file)
## Building the prerequisites
The Engine test suite now requires (at least) two additional pieces to run:
The Engine test suite now requires (at least) one additional pieces to run:
* `googletest`
* `gtest-parallel`
How this proceeds depends on your platform and whether or not you use a packaged
distribution.
@ -110,12 +108,6 @@ Ubuntu](https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/))
(i.e. the absolute path of where the `src` and `include` directories were
above - for me, `/Users/krista/googletest/googletest`).
### Installing `gtest-parallel`
Pick a source directory and put your `gtest-parallel` source there
(e.g. via `git clone https://github.com/google/gtest-parallel.git`).
We'll deal more with this when preparing to compile the test suite.
## Building the test suite
@ -133,9 +125,9 @@ are:
* `GTEST_INC_DIR`: This is where the include files for googletest are located
(defaults to `$(GTEST_SRC_DIR)/include`)
* `GTEST_PL`: This is the full path to the *python file* for `gtest_parallel`
(default presumes you cloned it under `src` in your home directory, i.e. it is
`$(HOME)/src/gtest-parallel/gtest_parallel.py`)
* `GTEST_PL`: This is the full path to the *python file* `gtest_parallel.py`
(default presumes you let the Makefile download it into the test directory
i.e. it is `gtest_parallel.py`)
### Building


Loading…
Cancel
Save