run.py: only test a random sample of 1000 testcases

This commit is contained in:
Johannes 'josch' Schauer 2017-03-29 17:49:57 +02:00
parent 67046842fe
commit acf634521a

5
run.py
View file

@ -18,6 +18,7 @@ import daklib_arch
import debarch
import tempfile
import os
import random
abi_from_abitable = [row[0] for row in debarch._load_table('/usr/share/dpkg/abitable')]
abi_from_ostable = [row[0].split('-')[0] for row in debarch._load_table('/usr/share/dpkg/ostable')]
@ -81,6 +82,10 @@ Version: 0.invalid.0
return len(data['report']) == 1
check_pairs = [ (d,w) for d in debarches for w in wildcard_list ]
random.seed(0) # to reproduce the same random sample
check_pairs = random.sample(check_pairs, int(len(check_pairs)/1000))
len_check_pairs = len(check_pairs)
print("checking %d testcases"%len_check_pairs)