mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
java: Added sanity checks and integrated them in CMake. Updated sample names and sample mapping.
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
46996e5251
commit
40f9135412
60
tests/check_consistency.py
Executable file
60
tests/check_consistency.py
Executable file
@ -0,0 +1,60 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import unittest as u
|
||||
import re, fnmatch, os
|
||||
|
||||
rootDir = '../src/'
|
||||
javaBlacklistFile = '../src/javaswig_blacklist'
|
||||
pythonBlacklistFile = '../src/pythonswig_blacklist'
|
||||
nodeBlacklistFile = '../src/nodeswig_blacklist'
|
||||
|
||||
|
||||
class BlacklistConsistency(u.TestCase):
|
||||
|
||||
def test_java_blacklist(self):
|
||||
|
||||
with open(javaBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
interfaceFileName = "javaupm_" + libraryName + ".i"
|
||||
|
||||
if interfaceFileName in files:
|
||||
self.fail("\n" + libraryName + " is in javaswig blacklist.\n" + \
|
||||
"Remove it from blacklist or remove " + \
|
||||
interfaceFileName + " from sources.")
|
||||
|
||||
|
||||
def test_python_blacklist(self):
|
||||
|
||||
with open(pythonBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
interfaceFileName = "pyupm_" + libraryName + ".i"
|
||||
|
||||
if interfaceFileName in files:
|
||||
self.fail("\n" + libraryName + " is in pythonswig blacklist.\n" + \
|
||||
"Remove it from blacklist or remove " + \
|
||||
interfaceFileName + " from sources.")
|
||||
|
||||
|
||||
def test_node_blacklist(self):
|
||||
|
||||
with open(nodeBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
interfaceFileName = "jsupm_" + libraryName + ".i"
|
||||
|
||||
if interfaceFileName in files:
|
||||
self.fail("\n" + libraryName + " is in nodeswig blacklist.\n" + \
|
||||
"Remove it from blacklist or remove " + \
|
||||
interfaceFileName + " from sources.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
u.main()
|
Reference in New Issue
Block a user