- #1
emilmammadzada
- 109
- 18
- TL;DR Summary
- Running the tests njoy16 in ubuntu terminal
With which commands can I build and run the tests files in njoy16 on ubuntu?
cd NJOY2016-2016.69
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j8
sudo make install
make test
i want build and run in tests sample 01 .I dont know using which commandlinesAlex A said:This is for njoy2016 ? A new release happened an hour ago. I grabbed it, unpacked and did,
Code:cd NJOY2016-2016.69 mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release ../ make -j8 sudo make install make test
You need some things installed, git, python, cmake, a fortran compiler. This is under ubuntu.
cd tests
cd 01
cp ../../../tests/resources/t511 tape20
cp ../../../tests/resources/t322 tape26
njoy < input
app give error command not foundAlex A said:(you are in build, having built and installed, the files tape20 and tape26 may already be there if you've run the tests)
The output messages is in the file called output. The result is in a file called tape25 which should match the reference file in the same directory. There are other files too, I have no idea what they are.Code:cd tests cd 01 cp ../../../tests/resources/t511 tape20 cp ../../../tests/resources/t322 tape26 njoy < input
i am trying to download it again if i get an error i will add it hereAlex A said:This sounds like the build did not complete correctly. What errors did you get at the end of the cmake step and the make step?
emil@DESKTOP-:~/NJOY2016/build$ cmake -DCMAKE_BUILD_TYPE=Release ../emilmammadzada said:i am trying to download it again if i get an error i will add it here
emil@DESKTOP-:~/NJOY2016/build$ makeAlex A said:Ok, any fatal errors running the make command?
emil@DESKTOP-:~/NJOY2016/build/tests/01$ lemilmammadzada said:emil@DESKTOP-:~/NJOY2016/build$ make
[ 92%] Building Fortran object CMakeFiles/njoy.dir/src/main.f90.o
[ 95%] Linking Fortran shared library libnjoy.so
[ 95%] Built target njoy
Scanning dependencies of target njoy_executable
[ 97%] Building Fortran object CMakeFiles/njoy_executable.dir/src/main.f90.o
[100%] Linking Fortran executable njoy
[100%] Built target njoy_executable
emil@DESKTOP-:~/NJOY2016/build$ sudo make install
[sudo] password for emil:
[ 95%] Built target njoy
[100%] Built target njoy_executable
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libnjoy.so
-- Installing: /usr/local/bin/njoy
-- Set runtime path of "/usr/local/bin/njoy" to ""
emil@DESKTOP-:~/NJOY2016/build$ make test
76/77 Test #76: Test76 ........................... Passed 211.17 sec
Start 77: Test78
77/77 Test #77: Test78 ........................... Passed 0.59 sec
100% tests passed, 0 tests failed out of 77
Total Test time (real) = 2156.79 sec
cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
this libnjoy.so in the build directoryAlex A said:That is strange. Does /usr/local/lib/libnjoy.so exist on your system?
A suggestion from the bug reports is to use this cmake line instead to make a static executable.
Rebuilding from that and installing again might avoid the problem.Code:cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
i try again its runningemilmammadzada said:this libnjoy.so in the build directory
emil@DESKTOP-:~/NJOY2016-2016.69/build$ l
CMakeCache.txt CTestTestfile.cmake Testing/ fortran_modules/ libnjoy.so* tests/
CMakeFiles/ Makefile cmake_install.cmake install_manifest.txt njoy*
The purpose of running tests in the Ubuntu terminal is to check the functionality and performance of a software or program. This helps to identify and fix any errors or bugs before the software is released to the public.
To run tests in the Ubuntu terminal, you can use a testing framework such as pytest or unittest. These frameworks allow you to write and execute test cases for your software. You can also use the command line to run specific tests or test suites.
Yes, you can run tests for any type of software in the Ubuntu terminal. As long as the software is compatible with Ubuntu, you can use a testing framework or command line to run tests and check for any issues.
After running the tests in the Ubuntu terminal, you will receive a report that indicates whether the tests have passed or failed. If all tests have passed, it means that the software is functioning as expected. If any tests have failed, it indicates that there may be errors or bugs that need to be addressed.
Yes, there are some best practices to follow when running tests in the Ubuntu terminal. These include writing clear and concise test cases, using a version control system to track changes, and regularly running tests to ensure the software remains functional and bug-free.