From: Marty K. <mrk...@co...> - 2011-11-01 11:25:30
|
Please remember that maven is new for me so I am not sure how to make the unit tests work the way maven expects. I think there are two things that need to be fixed. The first is that pvIOCJava depends on other projects. The second is environment variables for locating xml files. Lets take each separately. pvIOCJava uses the following: pvDataJava, pvAccessJava, JCA, CAJ. I assume that the pom.xml file can be changed to automatically get these. Is this true? What is the change? Some of the unit tests load databases where the records are created from xml files.The xml files require that some environment variables be defined. In particular JAVAIOC needs to be defined as the location of pvDataJava. This should be changed to PVIOCJAVA. If the unit tests are run from the pvIOCJava directory (both by eclipse and by maven) then the unit tests can define the environment variable before they load and databases. Does all this sound like the correct approach? Marty On 10/31/2011 12:34 PM, Carcassi, Gabriele wrote: > Greg, you can look at the build history: > https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ > The bulid 9 is the one that broke. There were unit tests introduced > that are not self reliant - need some outside setup which unit tests > MUST NOT require. > Until that's fixed, any change in any java project will trigger the > pvIOCJava build, and will fail. > There's nothing weird about it. This is how these things are supposed > to work: catch things that work only for they guy who committed, and > keep nagging until this is fixed for everybody else. > Gabriele > > ------------------------------------------------------------------------ > *From:* White, Greg [mailto:gr...@sl...] > *Sent:* Mon 10/31/2011 11:23 AM > *To:* Carcassi, Gabriele; Marty Kraimer > *Cc:* epi...@li... Developers > *Subject:* Re: Build failed in Jenkins: pvIOCJava - Build #11 > > Hi fellas, is this sorted out? It reads like Marty changed html, and > the hypothesis > is that a "regression" test of his committed html failed, and that it > failed > due to an incomplete environment. Seems weird all round. > > Cheers > Greg > > On 27 Oct 2011, at 16:13, Carcassi, Gabriele wrote: > > > Hi Marty: > > > >> I think the reason why the build fails is that the regression tests > > require that > >> environment variables be set for JAVAIOC and maybe PVDATA. > > There are two types of tests you should have: > > Unit tests, they match *Test.java. These should _not_ depend on > > _anything_ in the environment. It's the whole point: they set up what > > they need and they tear it down. > > Integration tests, the match *IT. These can depend on the environment > > (database servers running, devices, etc...) > > > > So, if those can be turned into unit tests (no environment dependencies) > > they should as they provide the best tests. If not, Mark them as > > integration tests by changing the class name. > > > > Thanks, > > Gabriele > > > > -----Original Message----- > > From: Marty Kraimer [mailto:mrk...@co...] > > Sent: Thursday, October 27, 2011 5:41 AM > > To: epi...@li... > > Subject: Re: Build failed in Jenkins: pvIOCJava - Build #11 > > > > I think the reason why the build fails is that the regression tests > > require that environment variables be set for JAVAIOC and maybe PVDATA. > > > > Who knows how to do this with maven? > > > > I committed changes to documentation to pvDataJava, pvDataCPP, and > > pvAccessJava. > > > > The changes to pvDataJava and pvDataCPP are to the description of the > > Metadata Syntax. > > See either pvDataJava/src/overview.html or > > pvDataCPP/documentation/pvDataCpp.html > > > > The old description was incorrect. In addition I made changes resulting > > from the discussion at the EPICS Meeting regarding normative types. > > > > That is > > > > structure > > alarm alarm > > > > Becomes > > > > structure > > alarm_t alarm > > > > The changes to pvAccessJava/src/org/epics/ca/client/overview.html say > > that: > > > > For channelGet onlu one get at a time is allowed. > > Same comment for channelPut, channelPutGet, channelRPC > > > > Marty > > > > > > On 10/26/2011 03:43 PM, car...@bn... wrote: > >> See<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/11/> > >> > >> ------------------------------------------ > >> [...truncated 161 lines...] > >> string source alarm > >> structure timeStamp > >> structure leaf > >> string source timeStamp > >> structure power > >> structure value > >> structure leaf > >> string source power.value > >> structure alarm > >> structure leaf > >> string source power.alarm > >> structure current > >> structure value > >> structure leaf > >> string source current.value > >> structure alarm > >> structure leaf > >> string source current.alarm > >> structure voltage > >> structure value > >> structure leaf > >> string source voltage.value > >> structure alarm > >> structure leaf > >> string source voltage.alarm > >> structure ps0 > >> structure alarm > >> structure leaf > >> string source ps0.alarm > >> structure timeStamp > >> structure leaf > >> string source ps0.timeStamp > >> structure power > >> structure value > >> structure leaf > >> string source ps0.power.value > >> structure alarm > >> structure leaf > >> string source ps0.power.alarm > >> structure current > >> structure value > >> structure leaf > >> string source ps0.current.value > >> structure alarm > >> structure leaf > >> string source ps0.current.alarm > >> structure voltage > >> structure value > >> structure leaf > >> string source ps0.voltage.value > >> structure alarm > >> structure leaf > >> string source ps0.voltage.alarm > >> structure ps1 > >> structure alarm > >> structure leaf > >> string source ps1.alarm > >> structure timeStamp > >> structure leaf > >> string source ps1.timeStamp > >> structure power > >> structure value > >> structure leaf > >> string source ps1.power.value > >> structure alarm > >> structure leaf > >> string source ps1.power.alarm > >> structure current > >> structure value > >> structure leaf > >> string source ps1.current.value > >> structure alarm > >> structure leaf > >> string source ps1.current.alarm > >> structure voltage > >> structure value > >> structure leaf > >> string source ps1.voltage.value > >> structure alarm > >> structure leaf > >> string source ps1.voltage.alarm request > >> a{b{c{d}}} structure > >> structure a > >> structure b > >> structure c > >> structure d > >> structure leaf > >> string source d > >> > >> Error Expected for next call!! > >> message field( does not have matching ) messageType error > >> > >> Error Expected for next call!! > >> message > >> ps1{ps1.alarm,ps1.timeStamp,power{ps1.power.value,ps1.power.alarm},cur > >> rent{ps1.current.value,ps1.current.alarm},voltage{ps1.voltage.value,ps > >> 1.voltage.alarm}mismatched { } messageType error Tests run: 1, > >> Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Running > >> org.epics.ioc.channelAccess.ChannelCreateDestoryTest > >> error envVariable JAVAIOC not found > >> line 4 column 49 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error no attribute was recognized > >> line 4 column 49 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file enumerated.xml not found in path: [null] line 6 column 36 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file timeStamp.xml not found in path: [null] line 7 column 35 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file limit.xml not found in path: [null] line 8 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file display.xml not found in path: [null] line 9 column 33 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file deadband.xml not found in path: [null] line 10 column 34 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file channelAccess.xml not found in path: [null] line 11 column > >> 39 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file generic.xml not found in path: [null] line 12 column 33 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file commonFields.xml not found in path: [null] line 13 column > >> 38 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file control.xml not found in path: [null] line 14 column 33 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file alarm.xml not found in path: [null] line 15 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file supportState.xml not found in path: [null] line 16 column > >> 38 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file caLink.xml not found in path: [null] line 17 column 32 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file dbLink.xml not found in path: [null] line 18 column 32 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file analog.xml not found in path: [null] line 19 column 32 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file event.xml not found in path: [null] line 20 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file calc.xml not found in path: [null] line 21 column 30 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file delay.xml not found in path: [null] line 22 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file rpc.xml not found in path: [null] line 23 column 29 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file powerSupply.xml not found in path: [null] line 24 column 37 > > > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error file portDriver.xml not found in path: [null] line 25 column 36 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> error envVariable JAVAIOC not found > >> line 26 column 52 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/xml/ > >> structures.xml> > >> > >> info null endDocument: warning 0 severe 23 fatal 0 line -1 column -1 > >> in null > >> > >> error envVariable JAVAIOC not found > >> line 5 column 39 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error no attribute was recognized > >> line 5 column 39 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error file records.xml not found in path: [null] line 6 column 33 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error envVariable JAVAIOC not found > >> line 7 column 42 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error envVariable PVDATA not found > >> line 8 column 47 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error no attribute was recognized > >> line 8 column 47 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error envVariable PVDATA not found > >> line 9 column 50 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error envVariable JAVAIOC not found > >> line 10 column 43 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error no attribute was recognized > >> line 10 column 43 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error file counter.xml not found in path: [null] line 11 column 33 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error file event.xml not found in path: [null] line 12 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error file array.xml not found in path: [null] line 13 column 31 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> error envVariable JAVAIOC not found > >> line 14 column 46 > >> in<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/exam > >> ple/exampleDB.xml> > >> > >> info null endDocument: warning 0 severe 13 fatal 0 line -1 column -1 > >> in null > >> > >> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.072 > > sec<<< FAILURE! > >> Running org.epics.ioc.monitor.MonitorTest IOCXMLReader.convert > >> terminating with > >> IOException:<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Bui > >> ld/ws/null/xml/structures.xml> (No such file or directory) > >> > >> > >> IOCXMLReader.convert terminating with > >> IOException:<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Bui > >> ld/ws/null/test/org/epics/ioc/monitor/power.xml> (No such file or > >> directory) > >> > >> > >> > >> ****timeStamp Test**** > >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 > > sec<<< FAILURE! > >> > >> Results : > >> > >> Failed tests: > >> testPVCopy(org.epics.ioc.pvCopy.PVCopyTest) > >> > >> testConnectDisconnect(org.epics.ioc.channelAccess.ChannelCreateDestory > >> Test) > >> > >> Tests in error: > >> testPVCopy(org.epics.ioc.monitor.MonitorTest) > >> > >> Tests run: 7, Failures: 2, Errors: 1, Skipped: 0 > >> > >> [INFO] > >> ---------------------------------------------------------------------- > >> -- > >> [ERROR] BUILD FAILURE > >> [INFO] > >> ---------------------------------------------------------------------- > >> -- > >> [INFO] There are test failures. > >> > >> Please refer > > to<https://irmis-dev.bnl.gov/jenkins/job/pvIOCJava%20-%20Build/ws/target > > /surefire-reports> for the individual test results. > >> [INFO] > >> ---------------------------------------------------------------------- > >> -- [INFO] For more information, run Maven with the -e switch [INFO] > >> ---------------------------------------------------------------------- > >> -- > >> [INFO] Total time: 9 seconds > >> [INFO] Finished at: Wed Oct 26 15:43:38 EDT 2011 [INFO] Final Memory: > >> 29M/345M [INFO] > >> ---------------------------------------------------------------------- > >> -- Build step 'Invoke top-level Maven targets' marked build as failure > > > >> Archiving artifacts > >> > >> > >> ---------------------------------------------------------------------- > >> -------- The demand for IT networking professionals continues to grow, > > > >> and the demand for specialized networking skills is growing even more > >> rapidly. > >> Take a complimentary Learning@Cisco Self-Assessment and learn about > >> Cisco certifications, training, and career opportunities. > >> http://p.sf.net/sfu/cisco-dev2dev > >> > > > > > > ------------------------------------------------------------------------ > > ------ > > The demand for IT networking professionals continues to grow, and the > > demand for specialized networking skills is growing even more rapidly. > > Take a complimentary Learning@Cisco Self-Assessment and learn about > > Cisco certifications, training, and career opportunities. > > http://p.sf.net/sfu/cisco-dev2dev > > > > > ------------------------------------------------------------------------------ > > The demand for IT networking professionals continues to grow, and the > > demand for specialized networking skills is growing even more rapidly. > > Take a complimentary Learning@Cisco Self-Assessment and learn > > about Cisco certifications, training, and career opportunities. > > http://p.sf.net/sfu/cisco-dev2dev > |