Code Monkey home page Code Monkey logo

aunit's People

Contributors

antoinewaugh avatar benej60 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aunit's Issues

Dependecy configuration seems to fail

My project uses AnyExctractor bundle (https://documentation.softwareag.com/onlinehelp/Rohan/Apama/v10-3/apama10-3/ApamaDoc/com/apama/util/AnyExtractor.html)

I have configured it in the .aunit file as a dependency:

<dependencies>
	<dependency bundle-filename="AnyExtractor.bnd" catalog="${APAMA_HOME}/catalogs/bundles"/>
</dependencies>

Executing the test results in the following problem:

2020-08-13 14:11:20,140 INFO  ==============================================================
2020-08-13 14:11:20,140 INFO  Id   : UtilTest
2020-08-13 14:11:20,141 INFO  Title: UtilTest
2020-08-13 14:11:20,141 INFO  ==============================================================
2020-08-13 14:11:22,468 WARN  Executed engine_inject <correlator> [Util.mon], exit status 2
2020-08-13 14:11:22,469 WARN     MonitorScript injection failed: /aunit-master/.__test/resources/Util.mon: Error on line 3: the name util in the com.apama namespace does not exist
2020-08-13 14:11:22,470 WARN     Error on line 30: "AnyExtractor" does not exist
2020-08-13 14:11:22,470 WARN     Error on line 49: "AnyExtractor" does not exist
2020-08-13 14:11:22,471 WARN     Error on line 63: "AnyExtractor" does not exist
2020-08-13 14:11:22,472 WARN     Error on line 80: "AnyExtractor" does not exist
2020-08-13 14:11:22,472 WARN     Error on line 94: "AnyExtractor" does not exist
2020-08-13 14:11:22,473 WARN     Error on line 110: "AnyExtractor" does not exist
2020-08-13 14:11:22,474 WARN     Error on line 111: "AnyExtractor" does not exist
2020-08-13 14:11:22,474 WARN     Error on line 112: "AnyExtractor" does not exist
2020-08-13 14:11:22,474 WARN     Error on line 125: "AnyExtractor" does not exist
2020-08-13 14:11:22,475 WARN     Error on line 130: "AnyExtractor" does not exist
2020-08-13 14:11:22,475 WARN     Error on line 149: "AnyExtractor" does not exist
2020-08-13 14:11:22,476 WARN     Error on line 154: "AnyExtractor" does not exist
2020-08-13 14:11:22,476 WARN     Error on line 172: "AnyExtractor" does not exist
2020-08-13 14:11:22,476 WARN     Error on line 183: "AnyExtractor" does not exist
2020-08-13 14:11:22,477 WARN     Error on line 199: "AnyExtractor" does not exist
2020-08-13 14:11:22,477 WARN     Error on line 210: "AnyExtractor" does not exist
2020-08-13 14:11:22,496 WARN  engine_inject <correlator> [Util.mon] failed: MonitorScript injection failed: /aunit-master/.__test/resources/Util.mon: Error on line 3: the name util in the com.apama namespace does not exist ... blocked [correlator.py:909,correlator.py:434,run.py:14]
2020-08-13 14:11:23,395 WARN  Executed engine_inject <correlator> [TestEvent.mon], exit status 2
2020-08-13 14:11:23,395 WARN     MonitorScript injection failed: TestEvent.mon: Error on line 29: "Util" does not exist
2020-08-13 14:11:23,396 WARN     Error on line 36: "Util" does not exist
2020-08-13 14:11:23,396 WARN     Error on line 39: "Util" does not exist
2020-08-13 14:11:23,397 WARN     Error on line 46: "Util" does not exist
2020-08-13 14:11:23,397 WARN     Error on line 53: "Util" does not exist
2020-08-13 14:11:23,397 WARN     Error on line 73: "Util" does not exist
2020-08-13 14:11:23,398 WARN     Error on line 90: "Util" does not exist
2020-08-13 14:11:23,398 WARN     Error on line 105: "Util" does not exist
2020-08-13 14:11:23,398 WARN     Error on line 120: "Util" does not exist
2020-08-13 14:11:23,399 WARN     Error on line 135: "Util" does not exist
2020-08-13 14:11:23,399 WARN     Error on line 152: "Util" does not exist
2020-08-13 14:11:23,399 WARN     Error on line 170: "Util" does not exist
2020-08-13 14:11:23,400 WARN     Error on line 187: "Util" does not exist
2020-08-13 14:11:23,400 WARN     Error on line 205: "Util" does not exist
2020-08-13 14:11:23,403 WARN  engine_inject <correlator> [TestEvent.mon] failed: MonitorScript injection failed: TestEvent.mon: Error on line 29: "Util" does not exist ... blocked [correlator.py:909,correlator.py:434,run.py:16]
2020-08-13 14:11:23,857 WARN  Executed engine_inject <correlator> [TestRunner.mon], exit status 2
2020-08-13 14:11:23,858 WARN     MonitorScript injection failed: TestRunner.mon: Error on line 12: "UtilTest" does not exist
2020-08-13 14:11:23,861 WARN  engine_inject <correlator> [TestRunner.mon] failed: MonitorScript injection failed: TestRunner.mon: Error on line 12: "UtilTest" does not exist ... blocked [correlator.py:909,correlator.py:434,run.py:17]
2020-08-13 14:12:23,936 WARN  Waiting for 'TESTS COMPLETE' ==1 in correlator.log timed out after 60 secs, with 0 matches
2020-08-13 14:12:24,395 WARN  *** ALL TESTS COMPLETE CHECK *** ... failed [run.py:32]
2020-08-13 14:12:24,396 INFO  
2020-08-13 14:12:24,396 INFO  cleanup:
2020-08-13 14:12:24,851 INFO  Executed shutdown <correlator>, exit status 0
2020-08-13 14:12:24,953 INFO  
2020-08-13 14:12:24,954 INFO  Test duration: 64.81 secs
2020-08-13 14:12:24,955 INFO  Test final outcome:  BLOCKED
2020-08-13 14:12:24,955 INFO  Test outcome reason: engine_inject <correlator> [Util.mon] failed: MonitorScript injection failed: /aunit-master/.__test/resources/Util.mon: Error on line 3: the name util in the com.apama namespace does not exist (+3 other failures)
2020-08-13 14:12:24,956 INFO  
2020-08-13 14:12:24,957 CRIT  
2020-08-13 14:12:24,957 CRIT  Completed test run at:  Thursday 2020-08-13 14:12:24 UTC
2020-08-13 14:12:24,957 CRIT  Total test duration:    64.82 secs
2020-08-13 14:12:24,958 CRIT  
2020-08-13 14:12:24,958 CRIT  Summary of non passes: 
2020-08-13 14:12:24,958 CRIT    BLOCKED: UtilTest 
/aunit-master/bin

aunit test throws an Error "Integer" does not exist

Steps to reproduce:

  1. checkout repository
  2. execute aunit build
  3. run aunit test
    Following problem:
Invalid file dependency listed within MathFloatTest: Z:\SAG\projects\Eppendorf\apama-backend\Math/src/Float.mon. Moving to next test.

Invalid file dependency listed within SampleUnitTest: Z:\SAG\projects\Eppendorf\apama-backend\test/sample.mon. Moving to next test.

2020-08-13 16:02:59,462 INFO  ==============================================================
2020-08-13 16:02:59,462 INFO  Id   : BasicTest
2020-08-13 16:02:59,462 INFO  Title: BasicTest
2020-08-13 16:02:59,462 INFO  ==============================================================
2020-08-13 16:03:01,298 INFO
2020-08-13 16:03:01,298 INFO  cleanup:
2020-08-13 16:03:01,376 INFO  Executed shutdown <correlator>, exit status 0
2020-08-13 16:03:01,454 INFO
2020-08-13 16:03:01,454 INFO  Test duration: 1.99 secs
2020-08-13 16:03:01,454 INFO  Test final outcome:  PASSED
2020-08-13 16:03:01,454 INFO
2020-08-13 16:03:01,454 INFO  ==============================================================
2020-08-13 16:03:01,454 INFO  Id   : HelloWorldTest
2020-08-13 16:03:01,454 INFO  Title: HelloWorldTest
2020-08-13 16:03:01,454 INFO  ==============================================================
2020-08-13 16:03:03,291 INFO
2020-08-13 16:03:03,291 INFO  cleanup:
2020-08-13 16:03:03,385 INFO  Executed shutdown <correlator>, exit status 0
2020-08-13 16:03:03,448 INFO
2020-08-13 16:03:03,448 INFO  Test duration: 1.99 secs
2020-08-13 16:03:03,448 INFO  Test final outcome:  PASSED
2020-08-13 16:03:03,448 INFO
2020-08-13 16:03:03,448 INFO  ==============================================================
2020-08-13 16:03:03,448 INFO  Id   : MathIntegerTest
2020-08-13 16:03:03,448 INFO  Title: MathIntegerTest
2020-08-13 16:03:03,448 INFO  ==============================================================
2020-08-13 16:03:05,001 WARN  Executed ANT, exit status 1
2020-08-13 16:03:05,095 WARN  Executed engine_inject <correlator> [TestEvent.mon], exit status 2
2020-08-13 16:03:05,095 WARN     MonitorScript injection failed: TestEvent.mon: Error on line 5: the name Integer in the com.aunit.sample namespace does not exist
2020-08-13 16:03:05,095 WARN     Error on line 15: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 16: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 18: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 19: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 29: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 30: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 32: "Integer" does not exist
2020-08-13 16:03:05,095 WARN     Error on line 33: "Integer" does not exist
2020-08-13 16:03:05,110 WARN  engine_inject <correlator> [TestEvent.mon] failed: MonitorScript injection failed: TestEvent.mon: Error on line 5: the name Integer in the com.aunit.sample namespace does not exist ... blocked [correlator.py:909,correlator.py:434,run.py:16]
2020-08-13 16:03:05,188 WARN  Executed engine_inject <correlator> [TestRunner.mon], exit status 2
2020-08-13 16:03:05,188 WARN     MonitorScript injection failed: TestRunner.mon: Error on line 12: "MathIntegerTest" does not exist
2020-08-13 16:03:05,188 WARN  engine_inject <correlator> [TestRunner.mon] failed: MonitorScript injection failed: TestRunner.mon: Error on line 12: "MathIntegerTest" does not exist ... blocked [correlator.py:909,correlator.py:434,run.py:17]

Test/Bundle Home cannot be set by external batch file

Hi,

following problem occurs with the aunit.bat file:
When I call aunit.bat from an external batch file in which I set AUNIT_TEST_HOME and AUNIT_BUNDLE_HOME, I get the following error during execution:

"\Jenkins\workspace\AUNIT.__test" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

which translates to that "\Jenkins\workspace\AUNIT.__test" cannot be syntactically processed on this position. What fixes the problem for me is:

replacing:

IF "%AUNIT_TEST_HOME%"=="" (
	SET AUNIT_TEST_HOME=%AUNIT_HOME%\.__test
)

IF "%AUNIT_BUNDLE_HOME%"=="" (
	SET AUNIT_BUNDLE_HOME=%AUNIT_HOME%\.__repository
)

with:

IF "%AUNIT_TEST_HOME%"=="" (
	SET "AUNIT_TEST_HOME=%AUNIT_HOME%\.__test"
)

IF "%AUNIT_BUNDLE_HOME%"=="" (
	SET "AUNIT_BUNDLE_HOME=%AUNIT_HOME%\.__repository"
)

Could you include this fix into your master branch? I'm using aunit with jenkins and need to run it via external batch file.
Thanks in advance!

Running test HelloWorld results in a aunit.py failure

Trying to run an out of the box example in a Docker build process results in a strange falure:

RUN ./aunit.sh test Math
 ---> Running in 307c3ad67707
Traceback (most recent call last):
  File "/aunit-master/test-build/aunit.py", line 495, in <module>
    main(sys.argv[1:])
  File "/aunit-master/test-build/aunit.py", line 480, in main
    contents = load_contents(file) 
  File "/aunit-master/test-build/aunit.py", line 270, in load_contents
    with open(filepath, encoding="utf8", errors="ignore") as f:
TypeError: 'errors' is an invalid keyword argument for this function
/aunit-master/.__test /aunit-master/bin

PYSYS FATAL ERROR: The supplied options did not result in the selection of any tests
/aunit-master/bin

With Docker I am using the official Apama builder image from Software AG:
Here is a Dockerfile example:

ARG APAMA_VERSION=10.5
ARG APAMA_BUILDER=store/softwareag/apama-builder:${APAMA_VERSION}
# Use the build environment
FROM ${APAMA_BUILDER}
USER root
ADD aunit-master /aunit-master
RUN ["chmod", "+x", "/aunit-master/bin/aunit.sh"]
ENV AUNIT_HOME=/aunit-master
ENV APAMA_JRE=$JAVA_HOME/jre
WORKDIR /aunit-master/bin
RUN ./aunit.sh build
RUN find /aunit-master -type f -exec chmod 777 {} \;
RUN ./aunit.sh test HelloWorld
RUN ./aunit.sh test Math

test HelloWorld and test Math result in the same failure

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.