This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 5.3: Writing Unit Tests results to a file

Guru 20035 points
Other Parts Discussed in Thread: TMS320F28335, CCSTUDIO

Hello,

I would like to run all of my unit tests one after the other.  Also, after each unit test completes, i would like to have the unit test output to a text file whether or not the unit test passed or failed.

Some of my Unit test use the Cycle accurate simulator and some run on the actual TMS320F28335, so that may be an issue.

Could someone give me some direction on doing this in CCS 5.3.

Thanks,
Stephen

 

  • Hello Stephen,

    DSS is the scripting utility that we provide with CCS to automate the debugger. It would fit your needs for automating the running of multiple regression tests in a row. There are various APIs for logging data to a file, such as unit test results and so forth:

    http://processors.wiki.ti.com/index.php/Debug_Server_Scripting

    Thanks

    ki

  • Hello Ki-Soo,

    Thanks for the info.  That will get me started.

    I got the error shown below when I tried to run the example in the wiki (http://processors.wiki.ti.com/index.php/Debug_Server_Scripting/Step_By_Step).  What's causing the error. My OS is Windows XP.

    Thanks,

    Stephen

    C:\ti\ccsv5\ccs_base\scripting\examples\DebugServerExamples>..\..\bin\dss LoadPr
    ogram.js
        NOTE: Workspace autobuilding has been turned off!
    SEVERE: Cannot read System Setup data from XML file C:\ti\ccsv5\ccs_base\scripti
    ng\examples\C64\tisim_c64xple.ccxml
    Error parsing file:
    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The
     primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\
    examples\C64\configurations\tisim_c64xple.xml while parsing file: C:\ti\ccsv5\cc
    s_base\scripting\examples\C64\configurations\tisim_c64xple.xml
    SEVERE: Could not start server: DebugServer.1: Cannot read System Setup data fro
    m XML file C:\ti\ccsv5\ccs_base\scripting\examples\C64\tisim_c64xple.ccxml
    Error parsing file:
    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The
     primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\
    examples\C64\configurations\tisim_c64xple.xml while parsing file: C:\ti\ccsv5\cc
    s_base\scripting\examples\C64\configurations\tisim_c64xple.xml
    org.mozilla.javascript.WrappedException: Wrapped com.ti.ccstudio.scripting.envir
    onment.ScriptingException: Could not start server: DebugServer.1: Cannot read Sy
    stem Setup data from XML file C:\ti\ccsv5\ccs_base\scripting\examples\C64\tisim_
    c64xple.ccxml
    Error parsing file:
    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The
     primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\
    examples\C64\configurations\tisim_c64xple.xml while parsing file: C:\ti\ccsv5\cc
    s_base\scripting\examples\C64\configurations\tisim_c64xple.xml (LoadProgram.js#2
    1)
            at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:16
    93)
            at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
            at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:20
    4)
            at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)

            at org.mozilla.javascript.gen.c1._c0(LoadProgram.js:21)
            at org.mozilla.javascript.gen.c1.call(LoadProgram.js)
            at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:3
    40)
            at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:275
    8)
            at org.mozilla.javascript.gen.c1.call(LoadProgram.js)
            at org.mozilla.javascript.gen.c1.exec(LoadProgram.js)
            at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:503)

            at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:4
    25)
            at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:391)
            at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:382)
            at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:179)
            at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100)
            at org.mozilla.javascript.Context.call(Context.java:528)
            at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:450)
            at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162)
            at com.ti.ccstudio.apps.internal.scripting.RunScript$1.run(RunScript.jav
    a:88)
    Caused by: com.ti.ccstudio.scripting.environment.ScriptingException: Could not s
    tart server: DebugServer.1: Cannot read System Setup data from XML file C:\ti\cc
    sv5\ccs_base\scripting\examples\C64\tisim_c64xple.ccxml
    Error parsing file:
    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The
     primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\
    examples\C64\configurations\tisim_c64xple.xml while parsing file: C:\ti\ccsv5\cc
    s_base\scripting\examples\C64\configurations\tisim_c64xple.xml
            at com.ti.debug.engine.scripting.DebugServer$SessionFactory.<init>(Debug
    Server.java:161)
            at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.jav
    a:1128)
            at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.jav
    a:65)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
            ... 18 more

    C:\ti\ccsv5\ccs_base\scripting\examples\DebugServerExamples>

     

     

  • Hi Stephen,

    stevenh said:

    I got the error shown below when I tried to run the example in the wiki (http://processors.wiki.ti.com/index.php/Debug_Server_Scripting/Step_By_Step).  What's causing the error. My OS is Windows XP.

    Thanks,

    Stephen

    C:\ti\ccsv5\ccs_base\scripting\examples\DebugServerExamples>..\..\bin\dss LoadPr
    ogram.js
        NOTE: Workspace autobuilding has been turned off!
    SEVERE: Cannot read System Setup data from XML file C:\ti\ccsv5\ccs_base\scripti
    ng\examples\C64\tisim_c64xple.ccxml

    The example uses a C64xp simulator as the target. If you did a custom install of CCS and did not install the components for C6000, then the example would not work for you.

    ki

  • Thanks.

  • HI,

    I am using Code Composer Studio 6.0.1 and see the problem with not being able to load the XML file.  I did a custom install and made sure I installed all of the c6000 components.  I don't see the configuration directory where this XML file is supposed to sit.

    The file that fails to load is

        C:\ti\ccsv6\ccs_base\scripting\examples\C64\configurations\tisim_c64xple.xml

    but the directory C:\ti\ccsv6\ccs_base\scripting\examples\C64\configurations does not exist.


    What did I do wrong?  Or did I disover a problem with the installer?


    Thanks,

    Tom

  • Hi Tom,

    Tom Kacvinsky said:
        C:\ti\ccsv6\ccs_base\scripting\examples\C64\configurations\tisim_c64xple.xml

    The DSS examples use the C6000 simulators. Unfortunately v6 no longer has simulator support. A bug has been filed to update all examples to non-simulator ones. Sorry for the confusion.

    ki

  • Hi Ki,

    Thanks for the quick response.

    Tom