Skip to content

Commit 45fc609

Browse files
authored
Update testing instructions (#99)
1 parent 6165b3c commit 45fc609

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

CONTRIBUTING.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ micromamba activate xeus-cpp
3838
You are now in a position to install xeus-cpp into this envirnoment. You can do this by executing
3939

4040
```bash
41-
mkdir build && cd build
41+
mkdir build
42+
cd build
4243
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib ..
43-
make install
44+
make
4445
```
4546

4647
To check that everything is installed correctly you can run the c++ tests by executing the following
@@ -56,3 +57,8 @@ and the python tests by executing
5657
cd ./test
5758
pytest -sv .
5859
```
60+
Once the build is passing all the tests you can install it by executing the following from the test folder
61+
```bash
62+
cd ..
63+
make install
64+
```

README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
`xeus-cpp` is a Jupyter kernel for cpp based on the native implementation of the
1515
Jupyter protocol [xeus](https://github.com/jupyter-xeus/xeus).
1616

17-
## Installation within a mamba envirnoment
17+
## Installation within a mamba envirnoment (non wasm build instructions)
1818

1919
To ensure that the installation works, it is preferable to install `xeus-cpp` in a
2020
fresh environment. It is also needed to use a
@@ -40,9 +40,24 @@ mamba install notebook cmake cxx-compiler xeus-zmq nlohmann_json=3.11.2 cppzmq x
4040
```
4141
Now you can compile the kernel from the source by executing (replace `$CONDA_PREFIX` with a custom installation prefix if need be)
4242
```bash
43-
mkdir build && cd build
43+
mkdir build
44+
cd build
4445
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib
45-
make && make install
46+
make
47+
```
48+
To test the build you execute the following to test the C++ tests
49+
```bash
50+
cd test
51+
./test_xeus_cpp
52+
```
53+
and
54+
```bash
55+
pytest -sv .
56+
```
57+
to perform the python tests. Once the build is passing all the tests you can install it by executing the following from the test folder
58+
```bash
59+
cd ..
60+
make install
4661
```
4762

4863
## Trying it online

docs/source/debug.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These steps are performed using the GNU Debugger (GDB), so ensure it is installe
88

99
.. code-block:: bash
1010
11-
cmake -D CMAKE_BUILD_TYPE=Debug ..
11+
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib ..
1212
1313
In the same folder, run the command and copy the JSON displayed in the terminal.
1414

@@ -32,4 +32,7 @@ Open a new terminal, navigate to the build directory, and run GDB to start debug
3232
Testing
3333
========================
3434

35-
The testing code for the source files is located in `test/test_interpreter.cpp`. Write the necessary tests and build the project as described in the repository's README or contributing guidelines. Then, execute `build/test/test_xeus_cpp` to verify if the tests were successful.
35+
The source code for the c++ tests is located in `test/test_interpreter.cpp`. The source code for the python tests is located in `test/test_xcpp_kernel.py`.
36+
Write the necessary tests and build the project as described in the repository's README or contributing guidelines.
37+
Then, execute `build/test/test_xeus_cpp` from the top level directory to verify if the c++ tests were successful,
38+
and `pytest -sv build/test/test_xcpp_kernel.py` to execute the python tests.

0 commit comments

Comments
 (0)