test: fix problem with helper scripts being executed by `setup.py test`
This commit is contained in:
parent
fcd3d4ff6c
commit
7e0515c477
|
@ -3,6 +3,7 @@
|
|||
import random
|
||||
import argparse
|
||||
|
||||
def main():
|
||||
desc = """
|
||||
Generate random access pattern.
|
||||
Each address in range [base, base+length) will be accessed only once,
|
||||
|
@ -28,3 +29,6 @@ data = [random.randrange(0, 2**data_width) for _ in range(length)]
|
|||
|
||||
for a, d in zip(address, data):
|
||||
print('0x{:08x},0x{:08x}'.format(a, d))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -43,6 +43,7 @@ data_widths = [32]
|
|||
bist_lengths = [1, 1024, 8192]
|
||||
bist_randoms = [False]
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Generate configuration for all possible argument combinations.',
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument('--sdram-modules', nargs='+', default=modules, help='--sdram-module options')
|
||||
|
@ -64,3 +65,6 @@ for i, (module, data_width, bist_length, bist_random) in enumerate(product):
|
|||
|
||||
json_str = json.dumps(configurations, indent=4)
|
||||
print(json_str)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue