Commit 97331a01 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Remove sample data from repo

parent e3c56c9e
...@@ -16,3 +16,4 @@ libtool ...@@ -16,3 +16,4 @@ libtool
autom4te.cache autom4te.cache
.DS_Store .DS_Store
build* build*
data/121B2TestData
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src tests SUBDIRS = src tests
EXTRA_DIST = doc/license.txt CMakeLists.txt cmake/config.h.in \ EXTRA_DIST = doc/license.txt CMakeLists.txt cmake/config.h.in \
cmake/macros.cmake README.SZIP Copyright.txt cmake/macros.cmake README.SZIP Copyright.txt data
bench: all sampledata = 121B2TestData
cd tests && $(MAKE) $(AM_MAKEFLAGS) bench sampledata_url = http://cwe.ccsds.org/sls/docs/SLS-DC/BB121B2TestData/$(sampledata).zip
benc: all update-sampledata:
cd tests && $(MAKE) $(AM_MAKEFLAGS) benc cd $(srcdir)/data && \
bdec: all rm -rf $(sampledata) && \
cd tests && $(MAKE) $(AM_MAKEFLAGS) bdec curl $(sampledata_url) -O && unzip $(sampledata).zip && \
.PHONY: bench benc bdec rm -f $(sampledata).zip && \
cd $(sampledata)/AllOptions && mv -f test_P512n22.dat test_p512n22.dat
.PHONY: update-sampledata
**********************************************************************
CCSDS sample data for libaec testing
**********************************************************************
Thanks to the chairman of CCSDS SLS-MHDC, Aaron Kiely, to let us Thanks to the chairman of CCSDS SLS-MHDC, Aaron Kiely, to let us
distribute BB121B2 test data with libaec. The data files are used distribute BB121B2 test data with libaec. The data files are used
during 'make check'. during 'make check'.
...@@ -6,3 +10,7 @@ The most recent version of the data is available from the CCSDS web ...@@ -6,3 +10,7 @@ The most recent version of the data is available from the CCSDS web
site: site:
http://cwe.ccsds.org/sls/docs/Forms/AllItems.aspx?RootFolder=%2Fsls%2Fdocs%2FSLS%2DDC%2FBB121B2TestData& http://cwe.ccsds.org/sls/docs/Forms/AllItems.aspx?RootFolder=%2Fsls%2Fdocs%2FSLS%2DDC%2FBB121B2TestData&
You can also update the data included in the distribution with
make update-sampledata
...@@ -31,6 +31,7 @@ AC_C_RESTRICT ...@@ -31,6 +31,7 @@ AC_C_RESTRICT
AC_CHECK_FUNCS([memset strstr]) AC_CHECK_FUNCS([memset strstr])
AC_CHECK_DECLS(__builtin_clzll) AC_CHECK_DECLS(__builtin_clzll)
AM_EXTRA_RECURSIVE_TARGETS([bench benc bdec])
AC_CONFIG_FILES([Makefile \ AC_CONFIG_FILES([Makefile \
src/Makefile \ src/Makefile \
tests/Makefile]) tests/Makefile])
......
...@@ -21,6 +21,11 @@ TARGET_LINK_LIBRARIES(aec_client aec) ...@@ -21,6 +21,11 @@ TARGET_LINK_LIBRARIES(aec_client aec)
IF(UNIX) IF(UNIX)
ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c) ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c)
ADD_CUSTOM_TARGET(bench
COMMAND ${CMAKE_SOURCE_DIR}/src/benc.sh ${CMAKE_SOURCE_DIR}/data/typical.rz
COMMAND ${CMAKE_SOURCE_DIR}/src/bdec.sh
DEPENDS aec_client utime
)
ENDIF(UNIX) ENDIF(UNIX)
IF(WIN32) IF(WIN32)
......
...@@ -15,4 +15,11 @@ utime_SOURCES = utime.c ...@@ -15,4 +15,11 @@ utime_SOURCES = utime.c
aec_LDADD = libaec.la aec_LDADD = libaec.la
aec_SOURCES = aec.c aec_SOURCES = aec.c
EXTRA_DIST = CMakeLists.txt EXTRA_DIST = CMakeLists.txt benc.sh bdec.sh
CLEANFILES = bench.dat bench.rz
bench-local: all benc bdec
benc-local: all
$(srcdir)/benc.sh $(top_srcdir)/data/typical.rz
bdec-local: all
top_srcdir=$(top_srcdir) $(srcdir)/bdec.sh
#!/bin/sh #!/bin/sh
set -e set -e
AEC=../src/aec
if [ ! -f bench.rz ]; then if [ ! -f bench.rz ]; then
echo "No encoded file found. Encoding now..." echo "No encoded file found. Encoding now..."
path=$(echo $0 | sed -e 's:[^/]*$::') ${top_srcdir}/src/benc.sh ${top_srcdir}/data/typical.rz
"${path}"/benc.sh
fi fi
rm -f dec.dat rm -f dec.dat
bsize=$(wc -c bench.dat | awk '{print $1}') bsize=$(wc -c bench.dat | awk '{print $1}')
utime=$(../src/utime $AEC -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1) utime=$(./utime ./aec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1)
perf=$(echo "$bsize/1048576/$utime" | bc) perf=$(echo "$bsize/1048576/$utime" | bc)
echo "*** Decoding with $perf MiB/s user time ***" echo "*** Decoding with $perf MiB/s user time ***"
cmp bench.dat dec.dat cmp bench.dat dec.dat
rm -f dec.dat
#!/bin/sh #!/bin/sh
set -e set -e
TEST_DATA=$1 TEST_DATA=$1
AEC=../src/aec AEC=./aec
if [ ! -f bench.dat ]; then if [ ! -f bench.dat ]; then
rm -f typical.dat rm -f typical.dat
$AEC -d -n16 -j64 -r256 -m $TEST_DATA typical.dat $AEC -d -n16 -j64 -r256 -m $TEST_DATA typical.dat
...@@ -9,9 +9,10 @@ if [ ! -f bench.dat ]; then ...@@ -9,9 +9,10 @@ if [ ! -f bench.dat ]; then
do do
cat typical.dat >> bench.dat cat typical.dat >> bench.dat
done done
rm -f typical.dat
fi fi
rm -f bench.rz rm -f bench.rz
utime=$(../src/utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1) utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1)
bsize=$(wc -c bench.dat | awk '{print $1}') bsize=$(wc -c bench.dat | awk '{print $1}')
perf=$(echo "$bsize/1048576/$utime" | bc) perf=$(echo "$bsize/1048576/$utime" | bc)
echo "*** Encoding with $perf MiB/s user time ***" echo "*** Encoding with $perf MiB/s user time ***"
ADD_LIBRARY(check_aec STATIC check_aec.c) ADD_LIBRARY(check_aec STATIC check_aec.c)
TARGET_LINK_LIBRARIES(check_aec aec)
ADD_EXECUTABLE(check_code_options check_code_options.c) ADD_EXECUTABLE(check_code_options check_code_options.c)
TARGET_LINK_LIBRARIES(check_code_options check_aec aec) TARGET_LINK_LIBRARIES(check_code_options check_aec aec)
...@@ -7,23 +6,21 @@ TARGET_LINK_LIBRARIES(check_code_options check_aec aec) ...@@ -7,23 +6,21 @@ TARGET_LINK_LIBRARIES(check_code_options check_aec aec)
ADD_EXECUTABLE(check_buffer_sizes check_buffer_sizes.c) ADD_EXECUTABLE(check_buffer_sizes check_buffer_sizes.c)
TARGET_LINK_LIBRARIES(check_buffer_sizes check_aec aec) TARGET_LINK_LIBRARIES(check_buffer_sizes check_aec aec)
ADD_EXECUTABLE(check_long_fs check_long_fs.c) ADD_TEST(NAME check_code_options COMMAND check_code_options)
TARGET_LINK_LIBRARIES(check_long_fs check_aec aec) ADD_TEST(NAME check_buffer_sizes COMMAND check_buffer_sizes)
ADD_TEST(check_code_options check_code_options)
ADD_TEST(check_buffer_sizes check_buffer_sizes)
ADD_TEST(check_long_fs check_long_fs)
ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
ADD_DEPENDENCIES(check
check_code_options
check_buffer_sizes
check_long_fs)
IF(UNIX) IF(UNIX)
ADD_CUSTOM_TARGET(bench ADD_EXECUTABLE(check_long_fs check_long_fs.c)
COMMAND ${CMAKE_SOURCE_DIR}/tests/benc.sh TARGET_LINK_LIBRARIES(check_long_fs check_aec aec)
COMMAND ${CMAKE_SOURCE_DIR}/tests/bdec.sh ADD_TEST(NAME check_long_fs COMMAND check_long_fs)
DEPENDS aec_client utime ADD_TEST(
NAME sampledata.sh
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/sampledata.sh ${CMAKE_CURRENT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
ADD_EXECUTABLE(check_szcomp check_szcomp.c)
TARGET_LINK_LIBRARIES(check_szcomp check_aec sz)
ADD_TEST(
NAME check_szcomp
COMMAND check_szcomp ${CMAKE_CURRENT_SOURCE_DIR}/../data/121B2TestData/ExtendedParameters/sar32bit.dat
) )
ENDIF(UNIX) ENDIF(UNIX)
...@@ -3,6 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src ...@@ -3,6 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src
TESTS = check_code_options check_buffer_sizes check_long_fs \ TESTS = check_code_options check_buffer_sizes check_long_fs \
szcomp.sh sampledata.sh szcomp.sh sampledata.sh
TEST_EXTENSIONS = .sh TEST_EXTENSIONS = .sh
CLEANFILES = test.dat test.rz
check_LTLIBRARIES = libcheck_aec.la check_LTLIBRARIES = libcheck_aec.la
libcheck_aec_la_SOURCES = check_aec.c check_aec.h libcheck_aec_la_SOURCES = check_aec.c check_aec.h
check_PROGRAMS = check_code_options check_buffer_sizes check_long_fs \ check_PROGRAMS = check_code_options check_buffer_sizes check_long_fs \
...@@ -22,12 +23,6 @@ check_szcomp_SOURCES = check_szcomp.c $(top_builddir)/src/szlib.h ...@@ -22,12 +23,6 @@ check_szcomp_SOURCES = check_szcomp.c $(top_builddir)/src/szlib.h
LDADD = libcheck_aec.la $(top_builddir)/src/libaec.la LDADD = libcheck_aec.la $(top_builddir)/src/libaec.la
check_szcomp_LDADD = $(top_builddir)/src/libsz.la check_szcomp_LDADD = $(top_builddir)/src/libsz.la
EXTRA_DIST = sampledata.sh szcomp.sh benc.sh bdec.sh CMakeLists.txt data EXTRA_DIST = sampledata.sh szcomp.sh CMakeLists.txt
szcomp.log: sampledata.log szcomp.log: sampledata.log
bench: benc bdec
benc:
$(srcdir)/benc.sh $(srcdir)/data/typical.rz
bdec:
$(srcdir)/bdec.sh
.PHONY: bench benc bdec
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment