Commit Graph

5665 Commits

Author SHA1 Message Date
Ben Liblit 709c38c049 Use ".singleFile" instead of "[0]" when we expect just one file
This documents our intent more clearly, and actively checks for
mistakes rather than silently ignoring unexpected extra files.
2018-04-17 15:02:36 -05:00
Ben Liblit e4f8d00cbe Start exploring publication features by adding source jar archives 2018-04-17 15:02:36 -05:00
Ben Liblit 2bf92e1214 Replicate test include/exclude patterns already used in Maven builds 2018-04-17 15:02:36 -05:00
Ben Liblit f287ee5c41 Add "com.ibm.wala.core.testdata" to classpath for testing
This lets the "DynamicCallGraphTest" tests pass.  The tests in that
class expect to find some element of the classpath that includes the
substring "com.ibm.wala.core.testdata".  They then treat that as a
collection of bytecode files to instrument.
2018-04-17 15:02:36 -05:00
Ben Liblit b8f1bb3aaf Skip a test intentionally; Maven already does the same
Big thanks to Julian for showing me where this exclusion logic lives
in the Maven configuration.  There's a "**/*AndroidLibs*.java"
exclusion pattern in the top-level "pom.xml".
2018-04-17 15:02:36 -05:00
Ben Liblit 2763589d1f Fix jar exclusion patterns to match what Ant uses
One previously-failing test class now passes.  Progress!
2018-04-17 15:02:36 -05:00
Ben Liblit d301a89f4f Add some Eclipse dependencies needed only when running tests
This allows two test classes to pass that previously were failing.
Yay!
2018-04-17 15:02:36 -05:00
Ben Liblit 06d464216b Add a resource directory containing a zip archive used for testing
The excluded test in this subproject still does not pass, though now
it's failing for a different reason than before.  Progress, I suppose!
2018-04-17 15:02:36 -05:00
Ben Liblit 7227deb8a9 Disable Gradle linter check for unused dependencies in Travis CI
It's telling me to remove "eclipse-deps:org.eclipse.core.runtime:+"
and "org.osgi:org.osgi.core:4.2.0" as unused dependencies in the
"com.ibm.wala.cast.java.ecj" subproject.  However, these two
dependencies (jar files) are actually needed; compilation fails
without them.
2018-04-17 15:02:36 -05:00
Ben Liblit 7e0ac84a03 Also get Eclipse JSDT from a P2 repository, but not the same one 2018-04-17 15:02:36 -05:00
Ben Liblit 5e0e251766 Find Eclipse jars using local Maven mirror of Eclipse P2 repository
This should give us a set of mutually-consistent jars rather than
picking up random, outdated pieces from Maven Central or wherever else
I could find them.  We now also have a single, central place where we
set the Eclipse version that we're building against.  Much, *much*
cleaner.
2018-04-17 15:02:36 -05:00
Ben Liblit 196dd2d971 Assume that Eclipse needs all standard test-resource processing 2018-04-17 15:02:36 -05:00
Ben Liblit d230fe836c Trivial whitespace tweak 2018-04-17 15:02:36 -05:00
Ben Liblit eb2d2dd850 Exclude one macOS test that I don't know how to fix right now 2018-04-17 15:02:36 -05:00
Ben Liblit e9ea4d7f1d Download appropriate Android SDK for current OS 2018-04-17 15:02:36 -05:00
Ben Liblit c02776fc4d Try to continue building/testing even after the first failure
If other, non-dependent tasks would also fail, I'd rather discover all
of them at once.
2018-04-17 15:02:36 -05:00
Ben Liblit fb33cbe03b "rm" on macOS apparently doesn't understand long ("--foo") flags 2018-04-17 15:02:36 -05:00
Ben Liblit cb72ebc177 macOS doesn't seem to have "xvfb-run", and may not need it anyway 2018-04-17 15:02:36 -05:00
Ben Liblit aff4067c39 Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
We're not going to attempt macOS Travis CI testing for Maven builds,
because I don't know whether that's even expected to work on the
official WALA master branch.  Our main focus here is Gradle.

Note that Travis macOS images do not support JDK switching, so
explicitly selecting the JDK version now becomes part of the
Linux-only configuration.

Travis macOS images also do not support Android as a build "language".
So our Travis CI configuration for Gradle builds now declares that
this is a Java project rather than an Android one.  That's OK, though,
because our Gradle scripts already handle downloading the Android SDK;
we don't need Travis CI to do that for us.  When building using Maven,
though, we still call this an Android project because Maven builds do
still rely on Travis CI to provide the Android SDK.

squash! Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
2018-04-17 15:02:36 -05:00
Ben Liblit 0e231b4363 Download a specific DroidBench release that we know works for us
If future DroidBench changes include things we need, then we can
decide to move to those newer revisions.  But we shouldn't allow
DroidBench to change out from under us implicitly whenever someone
commits something new to the DroidBench repository.
2018-04-17 15:02:36 -05:00
Ben Liblit 49eda8ffab Add "TODO" reminders of furture refactoring opportunities 2018-04-17 15:02:36 -05:00
Ben Liblit cdd4aac942 Factor out some repeated accesses to a task's output files 2018-04-17 15:02:35 -05:00
Ben Liblit 9b5cc743fe Derive Android platforms version from Android build-tools version
This should help us keep the two in sync if the latter changes one
day.
2018-04-17 15:02:35 -05:00
Ben Liblit 18a4edd84e Got DynamicDalvikComparisonJavaLibsTest working at some point 2018-04-17 15:02:35 -05:00
Ben Liblit ff8f6ec348 Ignore a transient file that appears during testing 2018-04-17 15:02:35 -05:00
Ben Liblit e3ebd87242 Grab an additional archive needed by DalvikAnnotationsTest 2018-04-17 15:02:35 -05:00
Ben Liblit 22acff5130 Download a few additional supporting files needed by tests 2018-04-17 15:02:35 -05:00
Ben Liblit d78d68176e Import a class that we will soon be using multiple times 2018-04-17 15:02:35 -05:00
Ben Liblit e529c9d96f Fix accidental copying of entire subproject as test resource 2018-04-17 15:02:35 -05:00
Ben Liblit e70ddf4dec Use an "android.jar" that matches the "dx.jar" we are already using
Nothing was obviously failing with the older "android.jar", but I feel
more comfortable knowing that these two are more closely matched.
2018-04-17 15:02:35 -05:00
Ben Liblit 1a82397fd7 Suppress harmless broken-pipe warnings from "yes" 2018-04-17 15:02:35 -05:00
Ben Liblit bcf685ba40 Set Android build-tools version in just one place 2018-04-17 15:02:35 -05:00
Ben Liblit b2fa87efe3 Use more recent "dx.jar" than is available through Maven Central
This lets us ditch pre-Java-8 in the Gradle build.  (The official WALA
master branch recently got rid of pre-Java-8 in its Maven build.)
That, in turn, lets two "com.ibm.wala.dalvik.test" tests pass that
previously were failing.  We still have two other failing tests in
that subproject, but this is definitely progress!

Our Gradle build scripts manage the entire process of downloading and
locally installing the appropriate Android SDK.  That includes
automatically accepting a license.  Maybe some lawyer will throw a fit
about that some day.  Until then, I'd rather have a build system that
does everything needed without imposing additional manual steps on
developers.
2018-04-17 15:02:35 -05:00
Ben Liblit 16c056f196 Ignore some transient files that appear during testing 2018-04-17 15:02:35 -05:00
Ben Liblit 9082a5205a Set name and version to help Gradle composite-build substitutions 2018-04-17 15:02:35 -05:00
Ben Liblit 2674806aa5 Update Eclipse JUnit test launchers for use with Buildship
Previously Buildship removed its classpath from all of these
launchers.  Now it's automatically putting that back in as soon as I
visit each launcher in Eclipse's "Run Configurations" dialog.  Not
sure what's going on here, but it certainly seems more sane to me to
assume that the Buildship-computed classpath *is* needed for all of
these.  I have an open question on the Gradle discussion forum to try
to understand what's going on here and how to fix it:
<https://discuss.gradle.org/t/launchers-lose-buildship-classpath-on-import-regain-it-later/25641>.
2018-04-17 15:02:35 -05:00
Ben Liblit 5de787bb2a Update Eclipse "Java Application" launchers for use with Buildship 2018-04-17 15:02:35 -05:00
Ben Liblit 83abb6a10a Use Eclipse-computed paths rather than hard-coding absolute paths 2018-04-17 15:02:35 -05:00
Ben Liblit b30da752e0 Remove launchers whose main Java code is found nowhere in WALA 2018-04-17 15:02:35 -05:00
Ben Liblit 557ea62426 Note some excessive resource copying that we should eventually fix 2018-04-17 15:02:35 -05:00
Ben Liblit 5b7e3f750e Create a broad "Process Test Resources" Eclipse launch configuration
This should prepare test resources for all subprojects.  A WALA
developer should run this once before running any tests inside
Eclipse.  Initially I'd hoped to make this more narrowly focused, but
Eclipse just doesn't have the infrastructure to deal with fine-grained
dependencies.  On the other hand, running "./gradlew
eclipsePrepareTestResources" automatically for each build seems like
overkill, and could end up being rather slow.  So for now we require
that the developer run this once, by hand.
2018-04-17 15:02:35 -05:00
Ben Liblit 62d7980ea3 Fix various warnings produced by "./gradlew javadoc"
Three stubborn warnings remain, but this is progress!
2018-04-17 15:02:35 -05:00
Ben Liblit 72a9ddd2d7 Fix warnings about Javadoc links to "java.lang.reflect" package 2018-04-17 15:02:35 -05:00
Ben Liblit 57e3dc15fa Trigger custom clean tasks whenever running "./gradlew clean"
A cleaned tree is now much closer to a pristine tree that has just
been checked out and never built.  The only extra created files that
are left behind are ".gradle", "buildSrc/.gradle", and
"buildSrc/build".
2018-04-17 15:02:35 -05:00
Ben Liblit 48fe74cba7 Unpack node.js in the same place that Maven unpacks it
This gets rid of some Eclipse warnings that stem from Buildship being
confused about what it should treat as a source directory if Maven and
Gradle are both being used in the same tree.
2018-04-17 15:02:35 -05:00
Ben Liblit 4809a365de Tweak Buildship-generated Eclipse ".project" file for extra jars 2018-04-17 15:02:35 -05:00
Ben Liblit ca5824a214 Update Gradle wrapper to Gradle 4.5
No major new features for us here, but better native caching and other
performance improvements.
2018-04-17 15:02:35 -05:00
Ben Liblit f7f8dd4351 Get a core test to work by putting "bcel-5.2.jar" where expected 2018-04-17 15:02:35 -05:00
Ben Liblit 2233d56d2a Get a Dalvik test to work by putting "dx.jar" where expected 2018-04-17 15:02:35 -05:00
Ben Liblit 9df594189d Compute a library path from the native software model
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.  That being said, extracting this
information from the depths of the native software model seems *far*
more complex than it should be.  I had hoped for something nicer in
response to
<https://discuss.gradle.org/t/compute-wl-rpath-flag-suitable-for-native-shared-library/25278>,
but so far there's nothing.
2018-04-17 15:02:35 -05:00