Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Basically TRACE32 RCL with python approach. Here is a simple video https://support.lauterbach.com/kb/articles/controlling-trace32-via-python Need to create a python script to launch, connect and...

1 answer below »

Basically TRACE32 RCL with python approach.


Here is a simple video
https://support.lauterbach.com/kb/articles/controlling-trace32-via-python


Need to create a python script to launch, connect and disconnect trace32


TRACE32 RCL


connect_trace32()

Implement connect_trace32() function

  1. Function shall connect to a TRACE32 session.
  2. Function shall accept the following parameters:
    • port: int - Remote API port number
  3. Function shall return the following:
    • result: int - 0 if successful, non-zero otherwise
  4. Tests should cover the following scenarios:
    • Existing port number
    • Non-existing port number
    • Negative port number


launch_trace32()

Implement launch_trace32() function:

  1. Function shall call linux_launcher.sh or windows_launcher.cmd based on the OS.
  2. Function shall accept the following parameters:
    • help: str - print a help/usage message is "-h", "-H" arguments are passed in.
    • **kwargs - All other arguments should be passed to the launcher script using the appropriate format.
  3. Function arguments shall be case-insensitive and prefixed by a dash.
  4. Function arguments shall be provided for all arguments supported by linux_launcher.sh and windows_launcher.cmd
  5. Function shall return the following:
    • result: List[str] - List of session names, e.g. SECpro_s0, Mpro_S0, ..., PCP_S1.
  6. Tests should cover the following combinations of hosts and arguments:
    • Hosts: Linux, Windows
    • Arguments:
      • -h
      • -H
      • -v sn -l cm -p sim
      • -v sn -l cm -p cadi
      • -v sn -l cm -p pal
      • -v sn -l cm -p sil
      • -v sn -l cm p sil -s 2
      • -v sn -l secure p sil -s 1
      • -v sn -l secure p sil -s 2
      • -v sn
      • -v mq
      • -v qs
      • -v emag


disconnect_trace32()

Implement disconnect_trace32() function:

  1. Function shall execute the QUIT command on all sessions (highest port # first).
  2. Function shall execute the .disconnect attribute on all sessions (highest port # first).


execute_practice_script() function

Implement execute_practice_script() function

  1. Function shall run a PRACTICE script and return the return message.
  2. Function shall accept the following parameters:
    name: str - Name of PRACTICE script.
  3. Function shall return the following:
    result: str - Value returned by script.
  4. Tests should cover the following scenarios:
    a. Script is not found
    b. Script generates an error
    c. Script returns an integer, string, and boolean

Implement a simple integration test:

  1. Launch TRACE32 on Siryn silicon.
  2. Connect to TRACE32 sessions.
  3. Run the following tests:
    • tests/trace32/regression_test_sn.cmm on SECpro_S0
    • tests/trace32/regression_test_sn.cmm on Mpro_S0
    • tests/trace32/regression_test_sn.cmm on PCP_S0
  4. Disconnect TRACE32.
Answered 11 days After Aug 04, 2022

Solution

Jahir Abbas answered on Aug 08 2022
73 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here