From 9ba9c03dc5f9e4309dc7253f5e494e5f8e53df61 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 16 Jan 2021 15:25:23 +0200 Subject: [PATCH] remove obsolete testing files --- test/.gitignore | 2 -- test/test.py | 61 ------------------------------------------------- 2 files changed, 63 deletions(-) delete mode 100644 test/.gitignore delete mode 100755 test/test.py diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index c12414de..00000000 --- a/test/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/a.out -/pkg-config.log diff --git a/test/test.py b/test/test.py deleted file mode 100755 index 17364541..00000000 --- a/test/test.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python3 - -# -# Helper module to build macOS version of various source ports -# Copyright (C) 2020-2021 Alexey Lysiuk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import os -import shlex -import subprocess -import sys - - -def _build(source_file: str): - self_path = os.path.dirname(os.path.abspath(__file__)) - pkg_config_path = os.path.abspath(self_path + '/../prefix/bin/pkg-config') - - args = ( - pkg_config_path, - '--cflags', '--libs', - os.path.splitext(source_file)[0] - ) - pkg_config_output = subprocess.check_output(args, cwd=self_path) - pkg_config_output = pkg_config_output.decode('utf-8').strip('\n') - - args = [ - 'clang', - '-arch', 'x86_64', - '-arch', 'arm64', - source_file - ] - args += shlex.split(pkg_config_output) - subprocess.check_call(args, cwd=self_path) - - -def _main(): - if len(sys.argv) == 1: - test_path = os.path.dirname(os.path.abspath(__file__)) - tests = [entry.name for entry in os.scandir(test_path) if entry.name.endswith('.cpp')] - else: - tests = sys.argv[1:] - - for test in tests: - _build(test) - - -if __name__ == '__main__': - _main()