Re: [LTP] "unzip01" testcase failed.

Caspar Zhang
2009-12-21T05:45:43Z

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

----- "Garrett Cooper" <yanegomi@gmail.com> wrote:
>
> I'm not convinced that this is the right solution because most of
> what's done here just replaced $(DIR)'s value with the bareword
> value.
> .INTERMEDIATE may be the only piece of value here, but I was avoiding
> it because it's a 3.81-ism I thought...

How about this one (see the attachment)?

Thanks,
Caspar
>
> Thanks,
> -Garrett

[-- Attachment #2: commands-unzip01.patch --]
[-- Type: application/octet-stream, Size: 1674 bytes --]

diff -Naur a/include/mk/generic_leaf_target.inc b/include/mk/generic_leaf_target.inc
--- a/include/mk/generic_leaf_target.inc 2009-12-01 17:57:15.000000000 +0800
+++ b/include/mk/generic_leaf_target.inc 2009-12-11 12:33:01.716202544 +0800
@@ -97,7 +97,7 @@
all: $(MAKE_TARGETS)

clean:: $(CLEAN_DEPS)
- -$(RM) -f $(CLEAN_TARGETS)
+ -$(RM) -rf $(CLEAN_TARGETS)

$(INSTALL_FILES): | $(INSTALL_DEPS)

diff -Naur a/runtest/commands b/runtest/commands
--- a/runtest/commands 2009-02-26 21:10:54.000000000 +0800
+++ b/runtest/commands 2009-12-11 12:55:07.386077960 +0800
@@ -10,7 +10,7 @@
logrotate export TCdat=$LTPROOT/testcases/bin; logrotate_tests.sh
mail export TCdat=$LTPROOT/testcases/bin; mail_tests.sh
cpio export TCdat=$LTPROOT/testcases/bin; cpio_tests.sh
-unzip01 unzip_tests.sh $LTPROOT/testcases/commands/unzip/tst_unzip_file.zip
+unzip01 unzip_tests.sh $LTPROOT/testcases/bin/tst_unzip_file.zip
gzip01 gzip_tests.sh
cp_tests01 cp_tests.sh
ln_tests01 ln_tests.sh
diff -Naur a/testcases/commands/unzip/Makefile b/testcases/commands/unzip/Makefile
--- a/testcases/commands/unzip/Makefile 2009-10-10 01:55:45.000000000 +0800
+++ b/testcases/commands/unzip/Makefile 2009-12-11 12:37:12.397202792 +0800
@@ -27,13 +27,13 @@
# Only build and install if we have the zip command.
HAVE_ZIPTOOLS := $(shell if which zip >/dev/null; then echo yes; else echo no; fi)

+ZIP := zip
DIR := tst_unzip.dir
-
-MAKE_TARGETS :=
+ZIPFILE := tst_unzip_file.zip
+MAKE_TARGETS := $(ZIPFILE)

ifeq ($(HAVE_ZIPTOOLS),yes)
-INSTALL_TARGETS := unzip_tests.sh
-$(INSTALL_TARGETS): $(ZIPFILE)
+INSTALL_TARGETS := unzip_tests.sh $(ZIPFILE)
endif

$(ZIPFILE): $(DIR)

[-- Attachment #3: Type: text/plain, Size: 390 bytes --]

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]