[infer][java] Remove the deprecated genrule from the BUCK files

Reviewed By: jvillard

Differential Revision: D3929506

fbshipit-source-id: a01301c
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot 6
parent 7da3a90c81
commit e38e16c948

@ -167,7 +167,7 @@ buck_test: infer
buck_test_xml: infer
make direct_tests
echo '<?xml version="1.0" ?><t/>' > test.xml # TODO: generate test.xml with test results
buck test --xml test.xml # TODO: generate test.xml with test results
NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py
inferTraceBugs_test: infer

@ -254,8 +254,8 @@ AC_SUBST([ENABLE_OCAML_BINANNOT])
# We use Buck to run the Infer tests
AC_MSG_CHECKING([which version of Buck to use])
buckversion_file=.buckversion
oss_buck_version=a965937ccdadf8119a98ab766c3feb0708dc424e
fb_buck_version=440619c312cf07951891083d8f02d05a713205b5
oss_buck_version=7722fca11136f5059c113379969a116802a58df0
fb_buck_version=3a688647b6fca77bda05ab55f2f53860a470edfc
AS_IF([test x"$is_facebook_tree" = x"yes"],
[buck_version=$fb_buck_version],
[buck_version=$oss_buck_version])

@ -344,12 +344,11 @@ class BuildIntegrationTest(unittest.TestCase):
env=env)
def test_buck_integration(self):
target = '//infer/tests/codetoanalyze/java/infer:analyze'
target = '//infer/tests/codetoanalyze/java/infer:compile'
test('buck', 'Buck',
ROOT_DIR,
[{'compile': ['buck', 'build', target]}],
clean_commands=[['buck', 'clean']],
enabled=(sys.platform == 'darwin'),
available=lambda: is_tool_available(['buck', '--version']))
def test_make_integration(

@ -1,48 +1,17 @@
# TODO: this file exists only to support buck integration in infer/tests/build_systems/build_integration_tests.py
sources = glob(['**/*.java'])
dependencies = [
'//infer/lib/java/android:android',
java_library(
name = 'compile',
srcs = glob(['**/*.java']),
deps = [
'//dependencies/java/guava:guava',
'//dependencies/java/jsr-305:jsr-305',
'//dependencies/java/jackson:jackson',
'//infer/lib/java:models',
'//infer/annotations:annotations',
]
java_library(
name = 'infer',
srcs = sources,
deps = dependencies,
'//infer/lib/java/android:android',
'//infer/models/java:builtins',
],
visibility = [
'PUBLIC'
]
)
def analysis_cmd(analyzer):
out = 'out'
clean_cmd = ' '.join(['rm', '-rf', out])
classpath = ':'.join([('$(classpath ' + path + ')') for path in dependencies])
infer_cmd = ' '.join([
'infer',
'--no-progress-bar',
'--absolute-paths',
'--no-filtering',
'-o', out,
'-a', analyzer,
'--',
'javac',
'-cp', classpath,
'$SRCS',
])
copy_cmd = ' '.join(['cp', out + '/report.csv', '$OUT'])
return ' && '.join([clean_cmd, infer_cmd, copy_cmd])
genrule(
name = 'analyze',
out = 'report.csv',
cmd = analysis_cmd('infer'),
deps = dependencies + [':infer'],
srcs = sources,
visibility = [
'PUBLIC',
],
)

Loading…
Cancel
Save