/ nix / checks / scripts / test-cpp-hello.bash
test-cpp-hello.bash
 1  #!/usr/bin/env bash
 2  # Test C++ Hello World compilation
 3  
 4  echo 'Testing: $CXX --version'
 5  $CXX --version || c++ --version || g++ --version
 6  
 7  echo ""
 8  echo "Creating test program..."
 9  cp "@cppHello@" hello.cpp
10  
11  echo "Compiling..."
12  c++ -o hello hello.cpp
13  
14  echo "Running..."
15  ./hello