Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-12-15 03:29:56 +0300
committerEli Schwartz <eschwartz@archlinux.org>2021-12-15 03:29:56 +0300
commitf6c991658bf1afda36d0f56926757d8b5d043a8f (patch)
tree6a03a252635ab28bcc6fc4f44c57d4ddae0961e4
parenta9773976845b19e89020c1215781e71116477ef1 (diff)
meson: simplify test setup
Resources are loaded from the current working directory. By setting the current working directory to the source dir, rather than the out of tree build dir, we can easily pick up the original resources without copying them around during configuration.
-rw-r--r--meson.build22
1 files changed, 1 insertions, 21 deletions
diff --git a/meson.build b/meson.build
index 3546c15..91f228b 100644
--- a/meson.build
+++ b/meson.build
@@ -62,26 +62,6 @@ if meson.version().version_compare('>= 0.54.0')
endif
if get_option('tests')
- # Try to find a copy command. If this is windows we probably don't have cp,
- # but if this is msys then we do, so make cp not required in that case, and
- # try Xcopy if cp isn't found
- prog_cp = find_program('cp', required : build_machine.system() != 'windows')
- command = ['-r']
- if not prog_cp.found()
- prog_cp = find_program('Xcopy')
- command = ['/E', '/I']
- endif
-
- # Copy the test resources into the build dir
- run_command(
- prog_cp,
- [
- command,
- meson.current_source_dir() / 'resources',
- meson.current_build_dir(),
- ],
- )
-
test(
'xmltest',
executable(
@@ -89,7 +69,7 @@ if get_option('tests')
['xmltest.cpp'],
link_with : [lib_tinyxml2],
),
- workdir : meson.current_build_dir(),
+ workdir : meson.current_source_dir(),
)
endif