diff options
author | Karl Berry <karl@freefriends.org> | 2008-05-15 16:13:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-05-15 16:13:01 +0000 |
commit | fa5d6d5d3ba960b4e51010ee42f03c21e7038901 (patch) | |
tree | d24751e5840e888ea33475fd52f1d1a4c205cc02 /Build/source/utils/lzma-utils/tests | |
parent | bd2d913a35df5a223eab385296046922ecdd1d4e (diff) |
delete lzma-utils
git-svn-id: svn://tug.org/texlive/trunk@8162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/lzma-utils/tests')
-rw-r--r-- | Build/source/utils/lzma-utils/tests/Makefile.am | 17 | ||||
-rw-r--r-- | Build/source/utils/lzma-utils/tests/Makefile.in | 420 | ||||
-rwxr-xr-x | Build/source/utils/lzma-utils/tests/basic | 36 | ||||
-rwxr-xr-x | Build/source/utils/lzma-utils/tests/mkdtemp | 109 | ||||
-rwxr-xr-x | Build/source/utils/lzma-utils/tests/perms | 33 | ||||
-rw-r--r-- | Build/source/utils/lzma-utils/tests/test-lib.sh | 87 |
6 files changed, 0 insertions, 702 deletions
diff --git a/Build/source/utils/lzma-utils/tests/Makefile.am b/Build/source/utils/lzma-utils/tests/Makefile.am deleted file mode 100644 index ea12de0112f..00000000000 --- a/Build/source/utils/lzma-utils/tests/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -TESTS_ENVIRONMENT = \ - abs_top_builddir='$(abs_top_builddir)' \ - abs_top_srcdir='$(abs_top_srcdir)' \ - srcdir='$(srcdir)' \ - top_srcdir='$(top_srcdir)' \ - PATH="`pwd`/../src/lzma$(PATH_SEPARATOR)$$PATH" - -TESTS = \ - basic \ - perms - -EXTRA_DIST = \ - $(TESTS) \ - mkdtemp \ - test-lib.sh - -.PHONY: $(TESTS) diff --git a/Build/source/utils/lzma-utils/tests/Makefile.in b/Build/source/utils/lzma-utils/tests/Makefile.in deleted file mode 100644 index 53cfc7deec2..00000000000 --- a/Build/source/utils/lzma-utils/tests/Makefile.in +++ /dev/null @@ -1,420 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/getopt.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GETOPT_H = @GETOPT_H@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SDK_CFLAGS = @SDK_CFLAGS@ -SDK_CXXFLAGS = @SDK_CXXFLAGS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -TESTS_ENVIRONMENT = \ - abs_top_builddir='$(abs_top_builddir)' \ - abs_top_srcdir='$(abs_top_srcdir)' \ - srcdir='$(srcdir)' \ - top_srcdir='$(top_srcdir)' \ - PATH="`pwd`/../src/lzma$(PATH_SEPARATOR)$$PATH" - -TESTS = \ - basic \ - perms - -EXTRA_DIST = \ - $(TESTS) \ - mkdtemp \ - test-lib.sh - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-TESTS check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am - - -.PHONY: $(TESTS) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Build/source/utils/lzma-utils/tests/basic b/Build/source/utils/lzma-utils/tests/basic deleted file mode 100755 index 20f476e34a9..00000000000 --- a/Build/source/utils/lzma-utils/tests/basic +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# FIXME - -# Copyright (C) 2007 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -if test "$VERBOSE" = yes; then - set -x - lzma --version -fi - -. $srcdir/test-lib.sh - -echo jjjjjjjjjjjjjjjjjjjjjjjj > in || framework_failure -fail=0 -lzma -c < in > out || fail=1 -lzma -d < out > copy || fail=1 -compare in copy || fail=1 - -lzma -c in > out || fail=1 -lzma -S '' -cd out > copy || fail=1 -compare in copy || fail=1 - -(exit $fail); exit $fail diff --git a/Build/source/utils/lzma-utils/tests/mkdtemp b/Build/source/utils/lzma-utils/tests/mkdtemp deleted file mode 100755 index 08f85aa2abc..00000000000 --- a/Build/source/utils/lzma-utils/tests/mkdtemp +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# Create a temporary directory, sort of like mktemp -d does. -# Usage: mkdtemp /tmp phoey.XXXXXXXXXX - -# First, try to use the mktemp program. -# Failing that, we'll roll our own mktemp-like function: -# - try to get random bytes from /dev/urandom -# - failing that, generate output from a combination of quickly-varying -# sources and gzip. Ignore non-varying gzip header, and extract -# "random" bits from there. -# - given those bits, map to file-name bytes using tr, and try to create -# the desired directory. -# - make only $MAX_TRIES attempts - -ME=`basename "$0"` -die() { echo >&2 "$ME: $@"; exit 1; } - -MAX_TRIES=4 - -rand_bytes() -{ - n=$1 - - chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - - dev_rand=/dev/urandom - if test -r "$dev_rand"; then - # Note: 256-length($chars) == 194; 3 copies of $chars is 186 + 8 = 194. - dd ibs=$n count=1 if="$dev_rand" | tr -c $chars 01234567$chars$chars$chars - return - fi - - cmds='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' - data=` (eval "$cmds") 2>&1 | gzip ` - - n_plus_50=`expr $n + 50` - - # Ensure that $data has length at least 50+$n - while :; do - len=`echo "$data"|wc -c` - test $n_plus_50 -le $len && break; - data=` (echo "$data"; eval "$cmds") 2>&1 | gzip ` - done - - echo "$data" \ - | dd bs=1 skip=50 count=$n 2>/dev/null \ - | tr -c $chars 01234567$chars$chars$chars -} - -mkdtemp() -{ - case $# in - 2);; - *) die "Usage: $ME DIR TEMPLATE";; - esac - - destdir=$1 - template=$2 - - case $template in - *XXXX) ;; - *) die "invalid template: $template (must have a suffix of at least 4 X's)";; - esac - - fail=0 - - # First, try to use mktemp. - d=`env -u TMPDIR mktemp -d -t -p "$destdir" "$template" 2>/dev/null` \ - || fail=1 - - # The resulting name must be in the specified directory. - case $d in "$destdir"*);; *) fail=1;; esac - - # It must have created the directory. - test -d "$d" || fail=1 - - # It must have 0700 permissions. - perms=`ls -dgo "$d" 2>/dev/null` || fail=1 - case $perms in drwx------*) ;; *) fail=1;; esac - - test $fail = 0 && { - echo "$d" - return - } - - # If we reach this point, we'll have to create a directory manually. - - # Get a copy of the template without its suffix of X's. - base_template=`echo "$template"|sed 's/XX*$//'` - - # Calculate how many X's we've just removed. - template_length=`echo "$template" | wc -c` - nx=`echo "$base_template" | wc -c` - nx=`expr $template_length - $nx` - - err= - i=1 - while :; do - X=`rand_bytes $nx` - candidate_dir="$destdir/$base_template$X" - err=`mkdir -m 0700 "$candidate_dir" 2>&1` \ - && { echo "$candidate_dir"; return; } - test $MAX_TRIES -le $i && break; - i=`expr $i + 1` - done - die "$err" -} - -mkdtemp "$@" diff --git a/Build/source/utils/lzma-utils/tests/perms b/Build/source/utils/lzma-utils/tests/perms deleted file mode 100755 index d327c4e86b4..00000000000 --- a/Build/source/utils/lzma-utils/tests/perms +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# FIXME - -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -if test "$VERBOSE" = yes; then - set -x - lzma --version -fi - -. $srcdir/test-lib.sh - -echo foo > in || framework_failure -chmod 644 in || framework_failure -fail=0 -lzma in || fail=1 -set - `ls -l in.lzma` -test "x$1" = x-rw-r--r-- || fail=1 - -(exit $fail); exit $fail diff --git a/Build/source/utils/lzma-utils/tests/test-lib.sh b/Build/source/utils/lzma-utils/tests/test-lib.sh deleted file mode 100644 index 09a2e0ce455..00000000000 --- a/Build/source/utils/lzma-utils/tests/test-lib.sh +++ /dev/null @@ -1,87 +0,0 @@ -# source this file; set up for tests - -# Skip this test if the shell lacks support for functions. -unset function_test -eval 'function_test() { return 11; }; function_test' -if test $? != 11; then - echo "$0: /bin/sh lacks support for functions; skipping this test." 1>&2 - (exit 77); exit 77 -fi - -skip_test_() -{ - echo "$0: skipping test: $@" 1>&2 - (exit 77); exit 77 -} - -uid_is_privileged_() -{ - # Make sure id -u succeeds. - my_uid=`id -u` \ - || { echo "$0: cannot run \`id -u'" 1>&2; return 1; } - - # Make sure it gives valid output. - case $my_uid in - 0) ;; - *[!0-9]*) - echo "$0: invalid output (\`$my_uid') from \`id -u'" 1>&2 - return 1 ;; - *) return 1 ;; - esac -} - -skip_if_() -{ - case $1 in - root) skip_test_ must be run as root ;; - non-root) skip_test_ must be run as non-root ;; - *) ;; # FIXME? - esac -} - -require_selinux_() -{ - case `ls -Zd .` in - '? .'|'unlabeled .') - skip_test_ "this system (or maybe just" \ - "the current file system) lacks SELinux support" - ;; - esac -} - -skip_if_root_() { uid_is_privileged_ && skip_test_ "must be run as non-root"; } -error_() { echo "$0: $@" 1>&2; (exit 1); exit 1; } -framework_failure() { error_ 'failure in testing framework'; } - -test_dir_=`pwd` - -this_test_() { echo "./$0" | sed 's,.*/,,'; } -this_test=`this_test_` - -# This is a stub function that is run upon trap (upon regular exit and -# interrupt). Override it with a per-test function, e.g., to unmount -# a partition, or to undo any other global state changes. -cleanup_() { :; } - -t_=`$abs_top_srcdir/tests/mkdtemp $test_dir_ lzma-$this_test.XXXXXXXXXX` \ - || error_ "failed to create temporary directory in $test_dir_" - -# Run each test from within a temporary sub-directory named after the -# test itself, and arrange to remove it upon exception or normal exit. -trap 'st=$?; cleanup_; d='"$t_"'; - cd '"$test_dir_"' && chmod -R u+rwx "$d" && rm -rf "$d" && exit $st' 0 -trap '(exit $?); exit $?' 1 2 13 15 - -cd $t_ || error_ "failed to cd to $t_" - -if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then - compare() { diff -u "$@"; } -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then - compare() { cmp -s "$@"; } -else - compare() { cmp "$@"; } -fi - -# Local Variables: -# indent-tabs-mode: nil -# End: |