Files
rocm-systems/tests/README.md
T

41 строка
766 B
Markdown
Исходник Обычный вид История

# HIP testing environment.
2016-01-26 20:14:33 -06:00
This document explains how to use the HIP CMAKE testing environment.
### Quickstart
Usage :
2016-02-26 19:38:22 -06:00
```
$ mkdir build
$ cd build
$ cmake ../src
$ make
$ make test
```
2016-01-26 20:14:33 -06:00
2016-02-26 19:39:14 -06:00
### How to add a new test
2016-01-26 20:14:33 -06:00
The tests/src/hipMemtest.cpp file contains a simple unit test and is a good starting point for other tests.
Copy this to a new test name and modify tests/src/CMakefiles.txt to add the test to the build environment.
2016-01-26 20:14:33 -06:00
#### Edit CMakefiles.txt:
// Example:
2016-02-26 19:38:22 -06:00
```
make_hip_executable (hipMemset hipMemset.cpp)
2016-02-26 19:38:22 -06:00
make_test(hipMemset " ")
```
2016-01-26 20:14:33 -06:00
2016-02-26 19:39:14 -06:00
### Running tests:
2016-02-26 19:38:22 -06:00
```
ctest
2016-02-26 19:38:22 -06:00
```
2016-01-26 20:14:33 -06:00
### Run subsets of all tests:
2016-02-26 19:38:22 -06:00
```
# Run one test on the commandline (obtain commandline parms from CMakefiles.tst)
2016-01-26 20:14:33 -06:00
./hipMemset
# Run all the memory tests:
ctest -R Memcpy
2016-02-26 19:38:22 -06:00
```
2016-01-26 20:14:33 -06:00