From f5e6b759d2d90cfd43e43f0619b5131f506e3fed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marko=20Gr=C3=B6nroos?= Date: Thu, 24 Jun 2010 12:33:28 +0000 Subject: [PATCH] Added Japitools comparison to differences script. svn changeset:13909/svn branch:6.4 --- build/bin/package-diff.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/build/bin/package-diff.py b/build/bin/package-diff.py index eec305b243..ec3b87f97b 100755 --- a/build/bin/package-diff.py +++ b/build/bin/package-diff.py @@ -9,6 +9,9 @@ from sets import Set downloadsite = "http://vaadin.com/download" latestfile = "/LATEST" +JAPIZE = "japize" +JAPICOMPAT = "japicompat" + ################################################################################ # Utility Functions ################################################################################ @@ -88,6 +91,26 @@ def listZipVaadinJarFiles(zipfile, vaadinversion): command ("rm %s" % (extractedjar)) return files +################################################################################ +# JAPI - Java API Differences +################################################################################ +def japize(version, zipfile): + jarfile = "/tmp/vaadin-tmp.jar" + packagedjar = "vaadin-%s/WebContent/vaadin-%s.jar" % (version, version) + command ("unzip -p %s %s > %s " % (zipfile, packagedjar, jarfile)) + + cmd = "%s as %s apis %s +com.vaadin, $JAVA_HOME/jre/lib/rt.jar lib/core/**/*.jar 2>/dev/null" % (JAPIZE, version, jarfile) + command (cmd) + + return "%s.japi.gz" % (version) + +def japicompat(japi1, japi2): + cmd = "%s -q %s %s" % (JAPICOMPAT, japi1, japi2) + pin = os.popen(cmd, "r") + lines = "".join(pin.readlines()) + pin.close() + return lines + ################################################################################ # ################################################################################ @@ -162,5 +185,17 @@ print "\n%d removed files:" % (len(removed)) for item in removed: print item +print "\n--------------------------------------------------------------------------------\nVaadin API differences" +oldjapi = japize(latestversion, locallatestpackage) +newjapi = japize(builtversion, builtpackage) + +print "\n--------------------------------------------------------------------------------\nLost API features\n" +japidiff1 = japicompat(oldjapi, newjapi) +print japidiff1 + +print "\n--------------------------------------------------------------------------------\nNew API features\n" +japidiff2 = japicompat(newjapi, oldjapi) +print japidiff2 + # Purge downloaded package command("rm %s" % (locallatestpackage)) -- 2.39.5