mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r24646] HDFFV-8640: Remove xlate_utility by fixing reference files to not add extra lines.
Tested: cmake and autotools local linux
This commit is contained in:
parent
8235d9820a
commit
2f86aa7551
@ -759,14 +759,6 @@ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
|
||||
ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build utility to copy and strip X lines of file
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (HDF5_BUILD_TOOLS AND BUILD_TESTING)
|
||||
SET (XLATE_UTILITY "xlatefile")
|
||||
ADD_EXECUTABLE(${XLATE_UTILITY} ${HDF5_RESOURCES_DIR}/xlatefile.c)
|
||||
ENDIF (HDF5_BUILD_TOOLS AND BUILD_TESTING)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Dashboard and Testing Settings
|
||||
#-----------------------------------------------------------------------------
|
||||
|
1
MANIFEST
1
MANIFEST
@ -2422,7 +2422,6 @@
|
||||
./config/cmake/GetTimeOfDayTest.cpp
|
||||
./config/cmake/HDF5CXXTests.cpp
|
||||
./config/cmake/HDF5Tests.c
|
||||
./config/cmake/xlatefile.c
|
||||
./config/cmake/CheckTypeSize.cmake
|
||||
./config/cmake/H5cxx_config.h.in
|
||||
./config/cmake/H5pubconf.h.in
|
||||
|
@ -1,56 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define BUFFERSIZE 1024
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
FILE *infile = NULL;
|
||||
FILE *outfile = NULL;
|
||||
char *buffer = NULL;
|
||||
char argbuf[8];
|
||||
size_t bytes = 0;
|
||||
size_t idx = 0;
|
||||
unsigned int lineidx = 0;
|
||||
unsigned int stripXlines = 3;
|
||||
|
||||
if(argc < 3)
|
||||
exit(1);
|
||||
if(NULL == (infile = fopen(argv[1], "rb")))
|
||||
exit(2);
|
||||
if(NULL == (outfile = fopen(argv[2], "wb+")))
|
||||
exit(3);
|
||||
if(argc > 3)
|
||||
if(argv[3][0] == '-')
|
||||
if(argv[3][1] == 'l') {
|
||||
strcpy(argbuf, &argv[3][2]);
|
||||
stripXlines = atoi(argbuf);
|
||||
}
|
||||
buffer = (char*)malloc(BUFFERSIZE);
|
||||
if(buffer) {
|
||||
while(!feof(infile)) {
|
||||
/* read the file into the buffer. */
|
||||
bytes = fread(buffer, 1, BUFFERSIZE, infile);
|
||||
if(lineidx < stripXlines) {
|
||||
for(idx = 0; idx < bytes; idx++) {
|
||||
if(buffer[idx] == '\n') {
|
||||
lineidx++;
|
||||
if(buffer[idx+1] == '\r')
|
||||
idx++;
|
||||
}
|
||||
if(lineidx >= stripXlines) {
|
||||
fwrite(&buffer[idx+1], 1, bytes-idx-1, outfile);
|
||||
idx = bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
fwrite(buffer, 1, bytes, outfile);
|
||||
}
|
||||
free(buffer);
|
||||
}
|
||||
fclose(outfile);
|
||||
fclose(infile);
|
||||
|
||||
return 0;
|
||||
}
|
@ -40,8 +40,8 @@ FOREACH (ref_file ${HDF5_REFERENCE_FILES})
|
||||
ADD_CUSTOM_COMMAND (
|
||||
TARGET ${HDF5_TEST_LIB_TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${XLATE_UTILITY}
|
||||
ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
|
||||
)
|
||||
ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES})
|
||||
|
||||
|
@ -61,10 +61,6 @@ TEST() {
|
||||
# Run test.
|
||||
TESTING $TEST_ERR
|
||||
(
|
||||
echo "#############################"
|
||||
echo "Expected output for $TEST_ERR"
|
||||
echo "#############################"
|
||||
|
||||
# Skip the plugin for testing missing filter.
|
||||
$ENVCMD $RUNSERIAL $TEST_ERR_BIN
|
||||
) >$actual 2>$actual_err
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for err_compat
|
||||
#############################
|
||||
Testing error API H5Eset/get_auto Testing error API based on data I/O All error API tests passed.
|
||||
This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
|
||||
********* Print error stack in HDF5 default way *********
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for err_compat
|
||||
#############################
|
||||
Test skipped because backward compatbility with v1.6 is NOT configured in
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for error_test
|
||||
#############################
|
||||
This program tests the Error API. There're supposed to be some error messages
|
||||
********* Print error stack in HDF5 default way *********
|
||||
Second Test-DIAG: Error detected in Second Program (1.0) thread (IDs):
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for error_test
|
||||
#############################
|
||||
Test skipped because backward compatbility with v1.6 is configured in
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for links_env
|
||||
#############################
|
||||
Testing external links via environment variable PASSED
|
||||
Testing external links via environment variable (w/new group format) PASSED
|
||||
All external Link (HDF5_EXT_PREFIX) tests passed.
|
||||
|
@ -54,8 +54,8 @@
|
||||
ADD_CUSTOM_COMMAND (
|
||||
TARGET h5stat
|
||||
POST_BUILD
|
||||
COMMAND ${XLATE_UTILITY}
|
||||
ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
|
||||
)
|
||||
ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -gd -m 5 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Small groups (with 0 to 9 links):
|
||||
# of groups with 0 link(s): 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -d --di=15 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Dataset dimension information:
|
||||
Max. rank of datasets: 2
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -d --dims=-1 h5stat_threshold.h5'
|
||||
#############################
|
||||
h5stat error: Invalid threshold for small datasets
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -l 0 h5stat_threshold.h5'
|
||||
#############################
|
||||
h5stat error: Invalid threshold for small groups
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -a -2 h5stat_threshold.h5'
|
||||
#############################
|
||||
h5stat error: Invalid threshold for small # of attributes
|
||||
|
@ -1,4 +1 @@
|
||||
#############################
|
||||
Expected output for 'h5stat --numattrs h5stat_threshold.h5'
|
||||
#############################
|
||||
h5stat error: Invalid threshold for small # of attributes
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -F h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
File space information for file metadata (in bytes):
|
||||
Superblock: 96
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -D h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
File space information for datasets' metadata (in bytes):
|
||||
Object headers (total/unused): 4136/1344
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -T h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
Dataset datatype information:
|
||||
# of unique datatypes used by datasets: 2
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -d h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
Dataset dimension information:
|
||||
Max. rank of datasets: 2
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -dT h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
Dataset dimension information:
|
||||
Max. rank of datasets: 2
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -f h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
File information
|
||||
# of unique groups: 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -g h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
Small groups (with 0 to 9 links):
|
||||
Total # of small groups: 0
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat h5stat_filters.h5'
|
||||
#############################
|
||||
Filename: h5stat_filters.h5
|
||||
File information
|
||||
# of unique groups: 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -h'
|
||||
#############################
|
||||
Usage: h5stat [OPTIONS] file
|
||||
|
||||
OPTIONS
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat --help'
|
||||
#############################
|
||||
Usage: h5stat [OPTIONS] file
|
||||
|
||||
OPTIONS
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -g -l 8 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Small groups (with 0 to 7 links):
|
||||
# of groups with 0 link(s): 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat --links=8 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
File information
|
||||
# of unique groups: 4
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat --links=20 -g h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Small groups (with 0 to 19 links):
|
||||
# of groups with 0 link(s): 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -g h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
Small groups (with 0 to 9 links):
|
||||
# of groups with 0 link(s): 35000
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -g -l 40000 h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
Small groups (with 0 to 39999 links):
|
||||
# of groups with 0 link(s): 35000
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -A h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
Small # of attributes (objects with 1 to 10 attributes):
|
||||
Total # of objects with small # of attributes: 0
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -G h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
File space information for groups' metadata (in bytes):
|
||||
Object headers (total/unused): 5145147/3220092
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
File information
|
||||
# of unique groups: 35001
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat '
|
||||
#############################
|
||||
Usage: h5stat [OPTIONS] file
|
||||
|
||||
OPTIONS
|
||||
|
@ -1,5 +1,2 @@
|
||||
#############################
|
||||
Expected output for 'h5stat notexist.h5'
|
||||
#############################
|
||||
Filename: notexist.h5
|
||||
h5stat error: unable to open file "notexist.h5"
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -AS -a 10 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Small # of attributes (objects with 1 to 10 attributes):
|
||||
# of objects with 1 attributes: 2
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -a 1 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
File information
|
||||
# of unique groups: 4
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -A --numattrs=25 h5stat_threshold.h5'
|
||||
#############################
|
||||
Filename: h5stat_threshold.h5
|
||||
Small # of attributes (objects with 1 to 25 attributes):
|
||||
# of objects with 1 attributes: 2
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat -A -a 100 h5stat_newgrat.h5'
|
||||
#############################
|
||||
Filename: h5stat_newgrat.h5
|
||||
Small # of attributes (objects with 1 to 100 attributes):
|
||||
# of objects with 100 attributes: 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
#############################
|
||||
Expected output for 'h5stat h5stat_tsohm.h5'
|
||||
#############################
|
||||
Filename: h5stat_tsohm.h5
|
||||
File information
|
||||
# of unique groups: 1
|
||||
|
@ -191,9 +191,6 @@ TOOLTEST() {
|
||||
# Run test.
|
||||
TESTING $STAT $@
|
||||
(
|
||||
echo "#############################"
|
||||
echo "Expected output for '$STAT $@'"
|
||||
echo "#############################"
|
||||
cd $TESTDIR
|
||||
$RUNSERIAL $STAT_BIN $@
|
||||
) >$actual 2>$actual_err
|
||||
|
Loading…
x
Reference in New Issue
Block a user