[141417] trunk/base/tests/test/trace
cal at macports.org
cal at macports.org
Sat Dec 12 01:26:38 PST 2015
Revision: 141417
https://trac.macports.org/changeset/141417
Author: cal at macports.org
Date: 2015-10-17 17:37:12 -0700 (Sat, 17 Oct 2015)
Log Message:
-----------
base: test/trace: Adapt to new output format
Trace mode no longer prints a message for each trace violation; Adjust the
expected output accordigly.
Modified Paths:
--------------
trunk/base/tests/test/trace/Makefile
trunk/base/tests/test/trace/Portfile
trunk/base/tests/test/trace/master
Modified: trunk/base/tests/test/trace/Makefile
===================================================================
--- trunk/base/tests/test/trace/Makefile 2015-10-18 00:09:35 UTC (rev 141416)
+++ trunk/base/tests/test/trace/Makefile 2015-10-18 00:37:12 UTC (rev 141417)
@@ -18,16 +18,15 @@
@rm -f /tmp/hello-trace
@ln -sf /usr/include/unistd.h /tmp/link-trace2
@-[ "`id -u`" == "0" ] && chown -h $(RUNUSR) /tmp/link-trace2
- @PORTSRC=$(PORTSRC) $(bindir)/port -t test > output 2>&1 || (cat output; exit 1)
+ @PORTSRC=$(PORTSRC) $(bindir)/port -vt test > output 2>&1 || (cat output; exit 1)
@rm -f /tmp/link-trace2
@rm -f /tmp/hello-trace
@rm -rf ../tracetesttmp
- @sed -e "s|$(PWD)|PWD|g" < output > output.sed
- @diff -u master output.sed 2>&1 | tee difference
+ @diff -u master output 2>&1 | tee difference
@if [ -s difference ]; then \
exit 1; \
else \
- rm -f difference output.sed; \
+ rm -f difference output; \
fi
clean::
Modified: trunk/base/tests/test/trace/Portfile
===================================================================
--- trunk/base/tests/test/trace/Portfile 2015-10-18 00:09:35 UTC (rev 141416)
+++ trunk/base/tests/test/trace/Portfile 2015-10-18 00:37:12 UTC (rev 141417)
@@ -24,6 +24,8 @@
if {![catch $operation]} {
ui_error "Operation ${operation} succeeded although it should have failed!"
error "test failure"
+ } else {
+ ui_info "${operation} failed as expected"
}
}
# the port directory is outside of the sandbox; make sure files can't be
Modified: trunk/base/tests/test/trace/master
===================================================================
--- trunk/base/tests/test/trace/master 2015-10-18 00:09:35 UTC (rev 141416)
+++ trunk/base/tests/test/trace/master 2015-10-18 00:37:12 UTC (rev 141417)
@@ -4,9 +4,31 @@
---> Configuring trace
---> Building trace
---> Testing trace
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/create-trace
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/create-trace-modenv
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/delete-trace
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/mkdir-trace
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/rename-trace
-Warning: An activity was attempted outside sandbox: PWD/tracetesttmp/rmdir-trace
+touch: ../tracetesttmp/create-trace: No such file or directory
+Command failed: touch ../tracetesttmp/create-trace
+Exit code: 1
+system "touch ../tracetesttmp/create-trace" failed as expected
+rm: ../tracetesttmp/delete-trace: No such file or directory
+Command failed: rm ../tracetesttmp/delete-trace
+Exit code: 1
+system "rm ../tracetesttmp/delete-trace" failed as expected
+ln: ../tracetesttmp/link-trace: No such file or directory
+Command failed: ln -s /usr/include/ ../tracetesttmp/link-trace
+Exit code: 1
+system "ln -s /usr/include/ ../tracetesttmp/link-trace" failed as expected
+mkdir: ../tracetesttmp: No such file or directory
+Command failed: mkdir ../tracetesttmp/mkdir-trace
+Exit code: 1
+system "mkdir ../tracetesttmp/mkdir-trace" failed as expected
+rmdir: ../tracetesttmp/rmdir-trace: No such file or directory
+Command failed: rmdir ../tracetesttmp/rmdir-trace
+Exit code: 1
+system "rmdir ../tracetesttmp/rmdir-trace" failed as expected
+mv: rename ../tracetesttmp/rename-trace to ../tracetesttmp/rename-new-trace: No such file or directory
+Command failed: mv ../tracetesttmp/rename-trace ../tracetesttmp/rename-new-trace
+Exit code: 1
+system "mv ../tracetesttmp/rename-trace ../tracetesttmp/rename-new-trace" failed as expected
+touch: ../tracetesttmp/create-trace-modenv: No such file or directory
+Command failed: DYLD_INSERT_LIBRARIES= touch ../tracetesttmp/create-trace-modenv
+Exit code: 1
+system "DYLD_INSERT_LIBRARIES= touch ../tracetesttmp/create-trace-modenv" failed as expected
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/519e290b/attachment.html>
More information about the macports-changes
mailing list