mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
99fccab359
2. Fixed plugin building (nc_test4/hdf5plugins) to be done properly by cmake and automake. 4. Duplicated part of the nc_test4 filter test code in examples/C An incomplete and untested set of hooks exist for OS-X in nc_test4/findplugins.in. They need testing.
36 lines
930 B
Plaintext
36 lines
930 B
Plaintext
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
#include <sys/wait.h>
|
|
|
|
/*
|
|
This is a round-about way of getting the output from
|
|
a shell script test. Apparently, LOG_DRIVER
|
|
only works for executables and not for shell scripts.
|
|
So, use this executable to indirectly invoke a shell script
|
|
test so that its output appears in e.g. travis log.
|
|
If I could figure out the shell equivalent of LOG_DRIVER,
|
|
then this would not be necessary.
|
|
*/
|
|
|
|
|
|
#define CMD "./tst_filter.sh"
|
|
#define TOPSRCDIR "@abs_top_srcdir@"
|
|
#define TOPBUILDDIR "@abs_top_builddir@"
|
|
|
|
int
|
|
main(int argc, char** argv)
|
|
{
|
|
int stat;
|
|
char path[4096];
|
|
|
|
fprintf(stderr,"test_wrapper: TOPSRCDIR=%s TOPBUILDDIR=%s\n",TOPSRCDIR,TOPBUILDDIR);
|
|
strcpy(path,TOPSRCDIR);
|
|
strcat(path,"/nc_test4/");
|
|
strcat(path,CMD);
|
|
fprintf(stderr,"test_wrapper: path=%s\n",path);
|
|
stat = system(path);
|
|
return WEXITSTATUS(stat);
|
|
}
|