Beispiel #1
0
def main(**params):
    '''
    Main entry to the flash test script.
    '''
    use_sumatra = True
    test_category = "FlashTesting"  # pick something

    # for the test
    test_params = dict(params)
    test_params.update(
        executable="femb_flash_test_main",
        argstr="{datadir} {outlabel}",
        datasubdir=
        "QuadEpcsTester",  # use easy to guess sub directory for each cycle
        outlabel="QuadEpcsTester",  # likewise, easy to guess files.
    )  # note: cycle is filled in the loop below

    tests = []
    tests.append(Test(**test_params))

    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    if r == None:
        print(
            "ERROR: runpolicy runner could not be defined, production test not started."
        )
        return
    s = Sequencer(tests, r)
    s.run()
Beispiel #2
0
def main(**params):
    '''
    Main entry to the test script.
    '''
    print("FEMB PRODUCTION TEST - START")

    use_sumatra = True
    test_category = "femb"

    #Explicitly define list of production tests to perform
    tests = []

    #Test 0
    params_test = dict(params)
    params_test.update(
        executable="femb_wib_measure_simple",
        argstr="{paramfile}",
        datadir="fembTest_check_setup",
        outlabel="fembTest_check_setup",
    )
    tests.append(Test(**params_test))

    #actually run tests here
    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    if r == None:
        print(
            "EXAMPLE PRODUCTION TEST - ERROR: runpolicy runner could not be defined, production test not started."
        )
        return
    s = Sequencer(tests, r)
    s.run()

    print("EXAMPLE PRODUCTION TEST - DONE")
Beispiel #3
0
def main(**params):
    '''
    Main entry to the test script.
    '''
    print( "EXAMPLE PRODUCTION TEST - START")
    now = time.time()
    params["session_start_time"] = time.strftime("%Y%m%dT%H%M%S", time.localtime(now))
    
    #HOW TO SUPPLY INPUT PARAMETERS TO TEST MODULE
    #parameters specific for a general test, more are defined by runpolicy runner
    #this example uses replacement fields to make it easier to define each individual test
    #main_params = dict(params)
    #main_params.update(
    #    executable = "femb_example_test",      # the program or script actually running the test
    #    #argstr = "{datadir} {outlabel}",      #command line arguments to exectuable
    #    argstr="{paramfile}",        #provide parameter file as argument
    #    datadir = "exampleTest_test_{test}",      # use easy to guess sub directory for each test, recommend defining it here
    #    outlabel = "exampleTest_test_{test}",       # likewise, easy to guess files, recommend defining it here
    #)                                               # note: "test" is filled in the loop below

    #can define the tests to perform in a loop, updating the params for each test
    #tests = [Test(test=n, **main_params) for n in range(1,4)]

    #Explicitly define list of production tests to perform
    all_tests = []
    tests = params["tests_to_do"]
    for i in tests:
    #Test 1
        params_test = dict(params)
        params_test.update( executable = i[0], argstr="{paramfile}", datasubdir = ".", outlabel = i[1],)
        all_tests.append(Test(**params_test))
    #actually run tests here
    r = runpolicy.make_runner(**params)
    if r == None:
      print("EXAMPLE PRODUCTION TEST - ERROR: runpolicy runner could not be defined, production test not started.")
      return
      
    s = Sequencer(all_tests, r)
    for i in (s.run()):
        yield (s.runner.params)
    
    s.run()
Beispiel #4
0
def main(**params):
    '''
    Main entry to the oscillator test script.
    '''

    use_sumatra = True
    test_category = "osc"  # pick something

    # for the main test script that gets run in 3 cycles
    main_params = dict(params)
    main_params.update(
        executable="femb_test_osc",
        argstr="{datadir} {outlabel}",
        datasubdir=
        "OscillatorTestingThermalCycle{cycle}",  # use easy to guess sub directory for each cycle
        outlabel="ThermalCycle_{cycle}",  # likewise, easy to guess files.
    )  # note: cycle is filled in the loop below

    # for the final summary script
    summary_params = dict(params)
    summary_params.update(
        executable="femb_test_osc_summary",
        argstr="{datadir} {outlabel}",
        datasubdir="OscillatorTestingSummary",
        outlabel="Summary",
    )

    # make one Cycle for each, err, cycle of the main test
    readymsg = "\n\nStarting thermal cycle {cycle}!\nAre the oscillators cold and ready for testing?\n(y/n): "
    finishmsg = "\n\nFinished thermal cycle {cycle}!\nAre the oscillators removed from LN2?\n(y/n): "
    cycles = [
        Cycle(readymsg, finishmsg, cycle=n, **main_params)
        for n in range(1, 4)
    ]

    # and one for the summary
    cycles.append(Cycle(**summary_params))

    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    s = Sequencer(cycles, r)
    s.run()
def main(**params):
    '''
    Main entry to the test script.
    '''
    print("FEMB PRODUCTION TEST - START")

    use_sumatra = False
    test_category = "femb"  # pick something

    #check for any required input paramaters here ie board id etc
    if (not params['operator']):
        print("Operator data not entered")
        return -99
    if (not params['box_ids']):
        print("Box ID data not entered")
        return -99
    if (not params['apa_pos']):
        print("APA Position data not entered")
        return -99

    #Explicitly define list of production tests to perform
    tests = []

    #Simple Measurement
    params_simple = dict(params)
    params_simple.update(executable="femb_test_simple",
                         argstr="{paramfile}",
                         datasubdir="fembTest_simple",
                         outlabel="fembTest_simple")
    tests.append(Test(**params_simple))

    #ENC Measurements: Loop over gain and shaping times

    params_test = dict(params)

    #Test with external clocks
    params_test.update(
        executable="femb_test_gainenc",
        argstr="{paramfile}",
        datasubdir="fembTest_gainenc_test_g2_s2_intpulse_extclock",
        outlabel="fembTest_gainenc_test_g2_s2_intpulse_extclock",
        gain=2,
        shape=2,
        base=1,
        useInternalPulser=True,
        useExtAdcClock=True)
    tests.append(Test(**params_test))

    #Current Measurement
    params_test_current = dict(params)
    params_test_current.update(executable="femb_check_current",
                               argstr="{paramfile}",
                               datasubdir="fembTest_check_current_test",
                               outlabel="fembTest_check_current_test")
    tests.append(Test(**params_test_current))

    #Summarize Results
    params_summary = dict(params)
    params_summary.update(executable="femb_mobile_summary",
                          argstr="{paramfile}",
                          datasubdir="fembTest_summary",
                          outlabel="fembTest_summary")
    tests.append(Test(**params_summary))

    #actually run tests here
    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    if r == None:
        print(
            "FEMB PRODUCTION TEST - ERROR: runpolicy runner could not be defined, production test not started."
        )
        return
    s = Sequencer(tests, r)
    s.run()

    print("FEMB PRODUCTION TEST - DONE")
Beispiel #6
0
def main(**params):
    '''
    Main entry to the test script.
    '''
    print("QUAD ADC PRODUCTION TEST - START")

    use_sumatra = True
    test_category = "example"  # pick something
    now = time.time()
    params["session_start_time"] = time.strftime("%Y%m%dT%H%M%S",
                                                 time.localtime(now))

    #check for executables used in test

    #Explicitly define list of production tests to perform
    tests = []

    #Test 0 - no reconfig long ramp test - configuration happens BEFORE cooldown
    params_test_0 = dict(params)
    params_test_0.update(executable="quadadc_test_funcgen",
                         argstr="{paramfile}",
                         datasubdir="quadAdcTest_noreconfig",
                         outlabel="quadAdcTest_noreconfig",
                         doReconfig=False)
    tests.append(Test(**params_test_0))

    #shut down setup before starting normal testing
    params_test_init_shutdown = dict(params)
    params_test_init_shutdown.update(executable="quadadc_prod_shutdownSetup",
                                     argstr="{paramfile}",
                                     datasubdir="quadAdcTest_init_shutdown",
                                     outlabel="quadAdcTest_init_shutdown")
    tests.append(Test(**params_test_0))

    #Take test data using internal vs exteranl ADC clock signals, 1MHz vs 2MHz
    #External + 2MHz

    params_test_funcgen_extclk_2MHz = dict(params)
    params_test_funcgen_extclk_2MHz.update(
        executable="quadadc_test_funcgen",
        argstr="{paramfile}",
        datasubdir="quadAdcTest_funcgen_extclk_2MHz",
        outlabel="quadAdcTest_funcgen_extclk_2MHz",
        isExternalClock=True,
        is1MHzSAMPLERATE=False)
    tests.append(Test(**params_test_funcgen_extclk_2MHz))

    #Internal + 2MHz
    params_test_funcgen_intclk_2MHz = dict(params)
    params_test_funcgen_intclk_2MHz.update(
        executable="quadadc_test_funcgen",
        argstr="{paramfile}",
        datasubdir="quadAdcTest_funcgen_intclk_2MHz",
        outlabel="quadAdcTest_funcgen_intclk_2MHz",
        isExternalClock=False,
        is1MHzSAMPLERATE=False)
    tests.append(Test(**params_test_funcgen_intclk_2MHz))

    #External + 1MHz
    params_test_funcgen_extclk_1MHz = dict(params)
    params_test_funcgen_extclk_1MHz.update(
        executable="quadadc_test_funcgen",
        argstr="{paramfile}",
        datasubdir="quadAdcTest_funcgen_extclk_1MHz",
        outlabel="quadAdcTest_funcgen_extclk_1MHz",
        isExternalClock=True,
        is1MHzSAMPLERATE=True)
    tests.append(Test(**params_test_funcgen_extclk_1MHz))

    #Internal + 1MHz
    params_test_funcgen_intclk_1MHz = dict(params)
    params_test_funcgen_intclk_1MHz.update(
        executable="quadadc_test_funcgen",
        argstr="{paramfile}",
        datasubdir="quadAdcTest_funcgen_intclk_1MHz",
        outlabel="quadAdcTest_funcgen_intclk_1MHz",
        isExternalClock=False,
        is1MHzSAMPLERATE=True)
    tests.append(Test(**params_test_funcgen_intclk_1MHz))

    #ADC input pin functionality test here

    #final shut down
    params_test_final_shutdown = dict(params)
    params_test_final_shutdown.update(executable="quadadc_prod_shutdownSetup",
                                      argstr="{paramfile}",
                                      datasubdir="quadAdcTest_final_shutdown",
                                      outlabel="quadAdcTest_final_shutdown")
    tests.append(Test(**params_test_0))

    #actually run tests here
    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    if r == None:
        print(
            "QUAD ADC PRODUCTION TEST - ERROR: runpolicy runner could not be defined, production test not started."
        )
        return
    s = Sequencer(tests, r)
    s.run()

    print("QUAD ADC PRODUCTION TEST - DONE")
Beispiel #7
0
def main(**params):
    '''
    Main entry to the test script.
    '''
    print("FEMB PRODUCTION TEST - START")

    use_sumatra = True
    test_category = "femb"  # pick something

    #check for any required input paramaters here ie board id etc
    if (not params['operator']):
        print("Operator data not entered")
        return -99
    if (not params['box_ids']):
        print("Box ID data not entered")
        return -99
    if (not params['am_ids']):
        print("Analog MB ID data not entered")
        return -99
    if (not params['fm_ids']):
        print("FPGA Mezz data not entered")
        return -99

    #Explicitly define list of production tests to perform
    tests = []

    #Test 0
    params_test_0 = dict(params)
    params_test_0.update(executable="femb_power_cycle_test",
                         argstr="{paramfile}",
                         datasubdir="fembTest_powercycle_test",
                         outlabel="fembTest_powercycle_test")
    tests.append(Test(**params_test_0))

    #ENC Measurements: Loop over gain and shaping times

    params_test = dict(params)
    #pulser_setting = [True, False]
    #pulser_text = ["intpulse","extpulse"]
    pulser_setting = [False, True]
    pulser_text = ["extpulse", "intpulse"]
    i = 0
    for pulser in pulser_setting:
        for s in range(0, 4):
            #for s in range(2,3):
            for g in range(2, 4):
                #for g in range(2,3):
                params_test.update(
                    executable="femb_test_gainenc",
                    argstr="{paramfile}",
                    datasubdir="fembTest_gainenc_test_g" + str(g) + "_s" +
                    str(s) + "_" + pulser_text[i],
                    outlabel="fembTest_gainenc_test_" + pulser_text[i],
                    gain=g,
                    shape=s,
                    base=0,
                    useInternalPulser=pulser_setting[i],
                    useExtAdcClock=True)
                tests.append(Test(**params_test))
        i += 1

    #Test with internal clocks
    params_test.update(
        executable="femb_test_gainenc",
        argstr="{paramfile}",
        datasubdir="fembTest_gainenc_test_g2_s2_extpulse_intclock",
        outlabel="fembTest_gainenc_test_g2_s2_intpulse_intclock",
        gain=2,
        shape=2,
        base=0,
        useInternalPulser=True,
        useExtAdcClock=False)
    tests.append(Test(**params_test))

    #Current Measurement
    params_test_current = dict(params)
    params_test_current.update(executable="femb_check_current",
                               argstr="{paramfile}",
                               datasubdir="fembTest_check_current_test",
                               outlabel="fembTest_check_current_test")
    tests.append(Test(**params_test_current))

    #Summarize Results
    params_summary = dict(params)
    params_summary.update(executable="femb_test_summary",
                          argstr="{paramfile}",
                          datasubdir="fembTest_summary",
                          outlabel="fembTest_summary")
    tests.append(Test(**params_summary))

    #actually run tests here
    r = runpolicy.make_runner(test_category, use_sumatra, **params)
    if r == None:
        print(
            "FEMB PRODUCTION TEST - ERROR: runpolicy runner could not be defined, production test not started."
        )
        return
    s = Sequencer(tests, r)
    s.run()

    print("FEMB PRODUCTION TEST - DONE")