Hi Josh, Thanks for the details. I had figured out the general ant setup for these. The new tests were fine in terms of compiling across JS and SWF (and worked without issue in the regular asjs build), so it wasn't an issue at the COMPILE::JS/COMPILE::SWF level. It was only in the js-only build that I had a problem, and that turned out to be inconsistencies in ant for determining the skip-tests flag for that build - for the framework projects that did not yet have tests. I missed addressing this for the new tests I added yesterday. I think it's all good now. Thanks again for your work on getting RoyaleUnit to work for javascript - I have ported most of the tests from the manualtests/UnitTests project I had set up.
I will continue to use this the manualtest project for iterative development. But I now have the assertion method signatures aligned with RoyaleUnit so it's very close for a simple copy/paste of test files into RoyaleUnit - I just need to change a couple more minor things to get there, which I will do in the coming week. Note that I added a swfVersion detection in the RoyaleUnit test apps. For some things like XML behavior and methods like removeAt/insertAt expected test results can vary depending on the swf version (or some tests can't be performed for methods that are not yet available in an older swf version). Having the tests aware of swf version for their expected values is helpful in case the swf version changes for compiling the tests at some future point... in theory they should continue to work if that happens. On Sat, Aug 10, 2019 at 4:59 AM Josh Tynjala <[email protected]> wrote: > In a library like frameworks/js/projects/CoreJS, the Ant build checks to > see if src/test/royale/build.xml exists to determine if it needs to run > tests for JS. If the file isn't there, it won't run tests for JS. This will > not prevent it from running tests for SWF. A similar check is also in the > Ant build for frameworks/projects/Core to determine if it needs to run > tests for SWF. > > This was basically how it was set up when we were using FlexUnit and could > only run SWF tests. I'm not sure who did that originally. I just made the > same mechanism work for JS tests too, once we had RoyaleUnit and the > <royaleunit> Ant task available. > > If you have some tests that need to be run in SWF only, but other tests > that should be run in both SWF and JS, then I think that you need to use > COMPILE::SWF to omit certain tests from the JS build. Similarly with > COMPILE::JS for JS-only tests. > > -- > Josh Tynjala > Bowler Hat LLC <https://bowlerhat.dev> > > > On Fri, Aug 9, 2019 at 1:42 AM Greg Dove <[email protected]> wrote: > > > It looked like the asjs build was fine, but I need to figure out what I > was > > doing wrong with the royaleunit setup to get it (presumably) not run the > > new swf tests in js-only. > > So I commented out the new tests in the build, and (fingers crossed) this > > should mean the js-only build will work again. > > @josh if you have any guidance about the js-only side of things for > > RoyaleUnit, I'd certainly welcome that! Maybe I'm missing something > really > > obvious (probably!). > > > > I'm not even sure how to run js-only build locally. But I will take > another > > look tomorrow. > > > > > > On Fri, Aug 9, 2019 at 6:20 PM Greg Dove <[email protected]> wrote: > > > > > > > > fyi, I am not sure what is causing the builds to fail, as they are > > working > > > fine for me locally. > > > I see one was failing on > > > Express: DataBindingExample > > > prior to my recent commits and is continuing to fail at the same spot > (it > > > does not do that for me locally) > > > > > > js-only seems stuck on one of the new royaleunit tests I added which > > > appears attempting to run for swf. > > > > > > I will be back in one hour to try to figure these out, sorry if there > is > > > any inconvenience > > > > > >
