Skip to content

Commit

Permalink
testsuite: Install test data for test431 into the datadir
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Oct 30, 2024
1 parent cf691f3 commit 8e76ac9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,7 @@ endif
cdata.set('bindir', bindir)
cdata.set('etcdir', pkgconfdir)
cdata.set('exec_prefix', exec_prefix)
cdata.set('datadir', datadir)
cdata.set('homedir', homedir)
cdata.set('libdir', libdir)
cdata.set('includedir', includedir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,11 +1349,9 @@ STATIC void test431()

ENTER_TEST

if (!Test) {
if (!Quiet) {
fprintf(stdout, "test431_data must be present in volume.\n");
}
test_skipped(T_SINGLE);
// FIXME: Fails specifically on Alpine Linux
if (Exclude) {
test_skipped(T_EXCLUDE);
goto test_exit;
}
if (!Mac && Path[0] == '\0') {
Expand Down Expand Up @@ -1388,7 +1386,7 @@ STATIC void test431()
}

/* Copy resource fork */
if (snprintf(cmd, sizeof(cmd), "mv %s/test431_data %s/.AppleDouble/%s", Path, Path, name) > sizeof(cmd)) {
if (snprintf(cmd, sizeof(cmd), "cp @datadir@/netatalk/test-data/test431_data %s/.AppleDouble/%s", Path, name) > sizeof(cmd)) {
if (!Quiet) {
fprintf(stdout,"FPOpenFork:test431: path too long\n");
}
Expand Down
4 changes: 4 additions & 0 deletions test/testsuite/data/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install_data(
'test431_data',
install_dir: datadir / 'netatalk' / 'test-data',
)
10 changes: 9 additions & 1 deletion test/testsuite/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
subdir('data')

t2_fpopenfork_c = configure_file(
input: 'T2_FPOpenFork.c.in',
output: 'T2_FPOpenFork.c',
configuration: cdata,
)

afptest_external_deps = []

if threads.found()
Expand Down Expand Up @@ -151,7 +159,6 @@ spectest_sources = [
'T2_FPDelete.c',
'T2_FPGetFileDirParms.c',
'T2_FPGetSrvrParms.c',
'T2_FPOpenFork.c',
'T2_FPSetDirParms.c',
'T2_FPSetFileParms.c',
'T2_FPMoveAndRename.c',
Expand All @@ -162,6 +169,7 @@ spectest_sources = [
'T2_Dircache_attack.c',
'T2_FPRead.c',
'T2_FPSetForkParms.c',
t2_fpopenfork_c,
]

executable(
Expand Down

0 comments on commit 8e76ac9

Please sign in to comment.