diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2019-07-28 01:57:35 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-07-28 12:05:38 +0200 |
commit | 20ba5b4d0246545ac403c6c752150fb492e8f53b (patch) | |
tree | 59fc28d8baa02a24f07f1177bdee00941d4f9831 /grc/tests/test_cpp.py | |
parent | 9c51758ce4f1e828d017e3a8eef17e2768ce8eb9 (diff) |
grc: Make sure that the C++ test works at all
Diffstat (limited to 'grc/tests/test_cpp.py')
-rw-r--r-- | grc/tests/test_cpp.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/grc/tests/test_cpp.py b/grc/tests/test_cpp.py index 7d15282434..8f908f7d99 100644 --- a/grc/tests/test_cpp.py +++ b/grc/tests/test_cpp.py @@ -20,16 +20,18 @@ from argparse import Namespace from os import path import tempfile -import subprocess -from .test_compiler import * +from grc.compiler import main -def test_cpp(): - test_compiler('test_cpp.grc') - if not os.path.exists('test_cpp/build'): - os.makedirs('directory') - return_code = subprocess.Popen('cmake ..', cwd='./build/') - assert(return_code == 0) - return_code = subprocess.Popen('make', cwd='./build/') - assert(return_code == 0) +def test_cpp(capsys): + args = Namespace( + output=tempfile.gettempdir(), + user_lib_dir=False, + grc_files=[path.join(path.dirname(__file__), 'resources', 'test_cpp.grc')], + run=True + ) + main(args) + + out, err = capsys.readouterr() + assert not err |