[111100] branches/gsoc13-tests/src/port1.0/tests
marius at macports.org
marius at macports.org
Sun Sep 15 03:16:18 PDT 2013
Revision: 111100
https://trac.macports.org/changeset/111100
Author: marius at macports.org
Date: 2013-09-15 03:16:18 -0700 (Sun, 15 Sep 2013)
Log Message:
-----------
port1.0: fixed portpatch test and Portfile
Modified Paths:
--------------
branches/gsoc13-tests/src/port1.0/tests/Portfile
branches/gsoc13-tests/src/port1.0/tests/portpatch.test
Modified: branches/gsoc13-tests/src/port1.0/tests/Portfile
===================================================================
--- branches/gsoc13-tests/src/port1.0/tests/Portfile 2013-09-15 09:13:26 UTC (rev 111099)
+++ branches/gsoc13-tests/src/port1.0/tests/Portfile 2013-09-15 10:16:18 UTC (rev 111100)
@@ -26,6 +26,19 @@
extract.suffix .tgz
distfiles [suffix ${name}_src-${version}]
+patchfiles file.diff
+
+patch {
+ foreach patch $patchfiles {
+ set fd [open ${portpath}/files/${patch} r]
+ set var [gets $fd]
+ close $fd
+ set fd [open ${workpath}/${distname}/test_patch w+]
+ puts $fd $var
+ close $fd
+ }
+}
+
post-patch {
reinplace "s|^CFLAGS = -g \$(WFLAGS)|CFLAGS = -g \$(WFLAGS) ${configure.cppflags} ${configure.cflags} ${configure.ldflags} [get_canonical_archflags]|g" ${worksrcpath}/Makefile.in
}
Modified: branches/gsoc13-tests/src/port1.0/tests/portpatch.test
===================================================================
--- branches/gsoc13-tests/src/port1.0/tests/portpatch.test 2013-09-15 09:13:26 UTC (rev 111099)
+++ branches/gsoc13-tests/src/port1.0/tests/portpatch.test 2013-09-15 10:16:18 UTC (rev 111100)
@@ -40,7 +40,7 @@
set distpath $pwd/dist
set usealtworkpath yes
set altprefix prefix
- set patchfiles {file1.bz2}
+ set patchfiles {file.diff}
set workpath $pwd/work
set worksrcpath $workpath/src
@@ -49,14 +49,9 @@
set macosx_deployment_target $pwd/deploy_target
file mkdir $filespath
- set fd [open $pwd/file w+]
- puts $fd "--- README 2005-08-25 23:49:29.000000000 +0300\n+++ \
- README.bk 2013-09-08 18:38:42.000000000 +0300 \n@@ -1,4 +1,3 @@ \n\
- -BUILDING FONDU \n Just type:\n $ configure\n $ make"
+ set fd [open $filespath/file.diff w+]
+ puts $fd "first line should get to the workpath"
close $fd
- if {[catch {exec tar cjf files/file1.bz2 file}]} {
- return "FAIL: cannot create test patch"
- }
set mport [mportopen file://.]
set workername [ditem_key $mport workername]
@@ -65,18 +60,14 @@
if {[$workername eval eval_targets patch]} {
return "FAIL: cannot run patch"
}
- if {![file exists $pwd/work/fondu-060102/README.bk]} {
+ if {![file exists $pwd/work/fondu-060102/test_patch]} {
return "FAIL: missing patched file"
}
- if {![file exists $pwd/work/fondu-060102/README.diff]} {
- return "FAIL: missing patched file"
- }
return "Patch successful."
} -cleanup {
file delete -force $filespath
- file delete -force $pwd/file
file delete -force $pwd/work
} -result "Patch successful."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130915/3c007639/attachment.html>
More information about the macports-changes
mailing list