openpower.test package

Submodules

openpower.test.common module

Bugreports: * https://bugs.libre-soc.org/show_bug.cgi?id=361

class openpower.test.common.ALUHelpers

Bases: object

check_cr_a(res, sim_o, msg)
check_fast_spr1(res, sim_o, msg)
check_fast_spr2(res, sim_o, msg)
check_fast_spr3(res, sim_o, msg)
check_int_o(res, sim_o, msg)
check_int_o1(res, sim_o, msg)
check_msr(res, sim_o, msg)
check_nia(res, sim_o, msg)
check_slow_spr1(res, sim_o, msg)
check_xer_ca(res, sim_o, msg)
check_xer_ov(res, sim_o, msg)
check_xer_so(res, sim_o, msg)
get_cia(alu, dec2)
get_cr_a(alu, dec2)
get_fast_spr1(alu, dec2)
get_fast_spr2(alu, dec2)
get_fast_spr3(alu, dec2)
get_int_o(alu, dec2)
get_int_o1(alu, dec2)
get_msr(alu, dec2)
get_nia(alu, dec2)
get_rd_sim_xer_ca(sim, dec2)
get_sim_cia(sim, dec2)
get_sim_cr_a(sim, dec2)
get_sim_cr_b(sim, dec2)
get_sim_cr_c(sim, dec2)
get_sim_fast_reg(sim, dec2, reg, name)
get_sim_fast_spr1(sim, dec2)
get_sim_fast_spr2(sim, dec2)
get_sim_fast_spr3(sim, dec2)
get_sim_int_o(sim, dec2)
get_sim_int_o1(sim, dec2)
get_sim_int_ra(sim, dec2)
get_sim_int_rb(sim, dec2)
get_sim_int_rc(sim, dec2)
get_sim_msr(sim, dec2)
get_sim_nia(sim, dec2)
get_sim_slow_spr1(sim, dec2)
get_sim_xer_ov(sim, dec2)
get_sim_xer_so(sim, dec2)
get_slow_spr1(alu, dec2)
get_slow_spr2(alu, dec2)
get_wr_fast_spr1(sim, dec2)
get_wr_fast_spr2(sim, dec2)
get_wr_fast_spr3(sim, dec2)
get_wr_sim_cr_a(sim, dec2)
get_wr_sim_xer_ca(sim, dec2)
get_wr_sim_xer_ov(sim, alu, dec2)
get_wr_sim_xer_so(sim, alu, dec2)
get_wr_slow_spr1(sim, dec2)
get_xer_ca(alu, dec2)
get_xer_ov(alu, dec2)
get_xer_so(alu, dec2)
set_cia(dec2, inp)
set_cr_a(dec2, inp)
set_cr_b(dec2, inp)
set_cr_c(dec2, inp)
set_fast_spr1(dec2, inp)
set_fast_spr2(dec2, inp)
set_fast_spr3(dec2, inp)
set_full_cr(dec2, inp)
set_int_ra(dec2, inp)
set_int_rb(dec2, inp)
set_int_rc(dec2, inp)
set_msr(dec2, inp)
set_slow_spr1(dec2, inp)
set_slow_spr2(dec2, inp)
set_xer_ca(dec2, inp)
set_xer_ov(dec2, inp)
set_xer_so(dec2, inp)
exception openpower.test.common.SkipCase

Bases: Exception

Raise this exception to skip a test case.

Usually you’d use one of the skip_case* decorators.

For use with TestAccumulatorBase

class openpower.test.common.TestAccumulatorBase

Bases: object

add_case(prog, initial_regs=None, initial_sprs=None, initial_cr=0, initial_msr=0, initial_mem=None, initial_svstate=0)
class openpower.test.common.TestCase(program, name, regs=None, sprs=None, cr=0, mem=None, msr=0, do_sim=True, extra_break_addr=None, svstate=0)

Bases: object

openpower.test.common.mask_extend(x, nbits, repeat)
openpower.test.common.skip_case(reason)

Unconditionally skip a test case.

Use like:

@skip_case(“my reason for skipping”) def case_abc(self):

or:

@skip_case def case_def(self):

For use with TestAccumulatorBase

openpower.test.common.skip_case_if(condition, reason)

Conditionally skip a test case.

Use like:

@skip_case_if(should_i_skip(), “my reason for skipping”) def case_abc(self):

For use with TestAccumulatorBase

Module contents