[SCM] Git repository for devscripts branch, master, updated. v2.11.7-53-gb3322e6

Benjamin Drung bdrung at debian.org
Thu May 31 14:58:36 UTC 2012


The following commit has been merged in the master branch:
commit b3322e60c867122d26cdb0fbfd60225a6ed114de
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu May 31 16:58:20 2012 +0200

    Add online test for uscan.

diff --git a/Makefile b/Makefile
index 542f4b1..c4695c4 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,9 @@ clean_translated_manpages:
 clean: clean_scripts clean_translated_manpages
 	rm -f version conf.default make_scripts
 
+online-test:
+	$(MAKE) -C test/ online-test
+
 test: test_test test_scripts
 
 install: all install_scripts
@@ -58,4 +61,4 @@ test_scripts:
 install_scripts:
 	$(MAKE) -C scripts/ install DESTDIR=$(DESTDIR)
 
-.PHONY: test
+.PHONY: online-test test
diff --git a/debian/changelog b/debian/changelog
index 1535523..1cc14ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,7 @@ devscripts (2.11.8) UNRELEASED; urgency=low
     + Try to guess the vendor based on the given distribution name (LP: #723715)
     + Prefer UBUMAIL over DEBEMAIL on Ubuntu (LP: #929846).
   * Add first tests for licensecheck.
+  * Add online test for uscan.
 
   [ Stefano Rivera ]
   * devscripts.Logger Don't substitute arguments into logged strings unless
diff --git a/test/Makefile b/test/Makefile
index 871f95f..2e827dc 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -4,4 +4,7 @@ test:
 	./test_debchange
 	./test_licensecheck
 
-.PHONY: test
+online-test:
+	./test_uscan
+
+.PHONY: test online-test
diff --git a/test/test_checkbashisms b/test/test_uscan
similarity index 53%
copy from test/test_checkbashisms
copy to test/test_uscan
index ded8a72..47da566 100755
--- a/test/test_checkbashisms
+++ b/test/test_uscan
@@ -14,20 +14,25 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-COMMAND="../scripts/checkbashisms.pl"
-WORKDIR="$(readlink -f "${0%/*}")"
+COMMAND="${0%/*}/../scripts/uscan.pl"
 
 . "${0%/*}/shunit2-helper-functions.sh"
 
 found() {
-    cd "$WORKDIR"
-    runCommand "$1" "" "$2" 1
+    runCommand "--report --watchfile ${0%/*}/uscan/$1 --package $2 --upstream-version $3" "$4" "" 0
 }
 
-testSource() {
-    local result="possible bashism in bashisms/source line 2 (should be '.', not 'source'):
-source foo.sh"
-    found "bashisms/source" "$result"
+testS3Bucket() {
+    local latest=$(curl -s http://s3.amazonaws.com/rds-downloads | \
+                   sed 's@\(</[A-Za-z]*>\)@\1\n at g' | grep '<Key>RDSCli-' | \
+                   sed 's at .*<Key>RDSCli-\([0-9.]*\)\.zip</Key>.*@\1 at g' | \
+                   sort -n | tail -n 1)
+    local result="Processing watchfile line for package rdscli...
+Newest version on remote site is ${latest}, local version is 1.4.007
+rdscli: Newer version (${latest}) available on remote site:
+  http://s3.amazonaws.com/rds-downloads/RDSCli-${latest}.zip
+  (local version is 1.4.007)"
+    found "s3bucket" "rdscli" "1.4.007" "$result"
 }
 
 . shunit2
diff --git a/test/uscan/s3bucket b/test/uscan/s3bucket
new file mode 100644
index 0000000..6a581b3
--- /dev/null
+++ b/test/uscan/s3bucket
@@ -0,0 +1,2 @@
+version=3
+http://s3.amazonaws.com/rds-downloads/RDSCli-([0-9].*).zip

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list