[107709] branches/gsoc13-tests/tests/test/xcodeversion

marius at macports.org marius at macports.org
Thu Jul 4 08:03:06 PDT 2013


Revision: 107709
          https://trac.macports.org/changeset/107709
Author:   marius at macports.org
Date:     2013-07-04 08:03:06 -0700 (Thu, 04 Jul 2013)
Log Message:
-----------
Added xcodeversion test.

Added Paths:
-----------
    branches/gsoc13-tests/tests/test/xcodeversion/DESCRIPTION
    branches/gsoc13-tests/tests/test/xcodeversion/test.tcl

Removed Paths:
-------------
    branches/gsoc13-tests/tests/test/xcodeversion/master

Added: branches/gsoc13-tests/tests/test/xcodeversion/DESCRIPTION
===================================================================
--- branches/gsoc13-tests/tests/test/xcodeversion/DESCRIPTION	                        (rev 0)
+++ branches/gsoc13-tests/tests/test/xcodeversion/DESCRIPTION	2013-07-04 15:03:06 UTC (rev 107709)
@@ -0,0 +1,4 @@
+This test checks the Xcode version. MacPorts needs at least Xcode 2.1.
+
+There are 2 test cases, one for the Xcode version and another to check the
+xcodebuild path.

Deleted: branches/gsoc13-tests/tests/test/xcodeversion/master
===================================================================
--- branches/gsoc13-tests/tests/test/xcodeversion/master	2013-07-04 15:03:04 UTC (rev 107708)
+++ branches/gsoc13-tests/tests/test/xcodeversion/master	2013-07-04 15:03:06 UTC (rev 107709)
@@ -1,8 +0,0 @@
---->  Fetching distfiles for xcodeversion
---->  Verifying checksums for xcodeversion
---->  Extracting xcodeversion
---->  Configuring xcodeversion
---->  Building xcodeversion
---->  Testing xcodeversion
-xcodeversion >= 2.1
-xcodebuildcmd = /usr/bin/xcodebuild

Added: branches/gsoc13-tests/tests/test/xcodeversion/test.tcl
===================================================================
--- branches/gsoc13-tests/tests/test/xcodeversion/test.tcl	                        (rev 0)
+++ branches/gsoc13-tests/tests/test/xcodeversion/test.tcl	2013-07-04 15:03:06 UTC (rev 107709)
@@ -0,0 +1,50 @@
+package require tcltest 2
+namespace import tcltest::*
+
+source [file dirname $argv0]/../library.tcl
+
+makeFile "" $output_file
+makeDirectory $work_dir
+set path [file dirname [file normalize $argv0]]
+
+
+# Initial setup
+load_variables $path
+set_dir
+port_index
+port_clean $path
+port_run $path
+
+proc xcode_ver {} {
+    global output_file
+    global path
+
+    set xcode "xcodeversion*"
+    set line [get_line $path/$output_file $xcode]
+    return $line
+}
+
+proc xcode_binpath {} {
+    global output_file
+    global path
+
+    set xcode "xcodebuildcmd*"
+    set line [get_line $path/$output_file $xcode]
+    return $line
+}
+
+test envvariables {
+    Regression test for XCode version.
+} -body {
+    xcode_ver
+} -result "xcodeversion >= 2.1"
+
+test xcode_path {
+    Regression test for XCode path.
+} -body {
+    xcode_binpath
+} -result "xcodebuildcmd = /usr/bin/xcodebuild"
+
+
+cleanup
+cleanupTests
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130704/501fea47/attachment.html>


More information about the macports-changes mailing list