commit 931d3de6c1c903cfd47842bc5026a9294ac492b4 Author: Siu Chi Chan <siuchi.chan@amd.com> Date: Mon Feb 13 10:54:06 2017 -0500 only force to libstdc++ if the g++ is older than version 5 since hcc already defaults to libstdc++ with newer g++ commit 1ef8d71aa788de7b9eead4906fe56186f06d7d3f Author: scchan <siuchi.chan@amd.com> Date: Sun Feb 12 14:44:11 2017 -0500 remove hardcoded -lc++ in tests commit 5d99ef338eb3a66523cc9ddd139e86c6fd707b9c Author: scchan <siuchi.chan@amd.com> Date: Sun Feb 12 14:35:46 2017 -0500 force include libstdc++ headers and stdc++ only if g++ version < 5 since hcc uses libstdc++ by default if g++ > 5 is present commit a2bc21b24d100feefe91cd3cb2271238bda0738a Author: scchan <siuchi.chan@amd.com> Date: Fri Feb 10 04:36:27 2017 -0500 use hcc-config to generate compiler and linker flags Change-Id: I13a79629c0adfd75439a47d0488ff4fd619c55ba (cherry picked from commit 866e744e40cf1378af8a679b54959bf5226c340f)
HIP testing environment.
This document explains how to use the HIP CMAKE testing environment.
Quickstart
Usage :
$ mkdir build
$ cd build
$ cmake ../src
$ make
$ make test
How to add a new test
The tests/src/runtimeApi/memory/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.
Recent versions of the test infrastructure use a hierarchy of folders. Each folder contains src and CMakefiles.txt file. See the CMakefiles.txt files for description of the intended purpose for each sub-directory.
Edit CMakefiles.txt:
// Example:
# Build the test executable:
build_hip_executable (hipMemset hipMemset.cpp)
# This runs the tests with the specified command-line testing.
# Multiple make_test may be specified.
make_test(hipMemset " ")
It is recommended to place the build and run steps adjacent in the CMakefiles.txt.
Running tests:
ctest
Run subsets of all tests:
# Run one test on the commandline (obtain commandline parms from CMakefiles.tst)
./hipMemset
# Run all the memory tests:
ctest -R Memcpy
If a test fails - how to debug a test
Find the test and commandline that fail:
(From the test build directory, perhaps hip/tests/build) grep -IR hipMemcpy-modes -IR ../tests/ ../tests/src/runtimeApi/memory/hipMemcpy.cpp: * RUN_NAMED: %t hipMemcpy-modes --tests 0x1