mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Fixed many bugreports. Correct recognition for some Core2 Xeons, some ConroeLs, Sempron Codenames, some A64 and A64X2 codenames.
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@36 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
parent
1070fc3f25
commit
a1395632fa
10 changed files with 816 additions and 15 deletions
|
@ -32,6 +32,10 @@ def make_tempname(prefix):
|
|||
prefix += random.choice(chars)
|
||||
return prefix
|
||||
|
||||
def fmt_error(err):
|
||||
pfix = " %s: " % err[0]
|
||||
return "%sexpected `%s'\n%sgot `%s'" % (pfix, err[1], " "*len(pfix), err[2])
|
||||
|
||||
def do_test(inp, expected_out, testno, binary):
|
||||
fninp = make_tempname("cpuidin")
|
||||
fnoutp = make_tempname("cpuidout")
|
||||
|
@ -54,11 +58,11 @@ def do_test(inp, expected_out, testno, binary):
|
|||
err_fields = []
|
||||
for i in range(len(real_out)):
|
||||
if real_out[i] != expected_out[i]:
|
||||
err_fields.append(fields[i])
|
||||
err_fields.append((fields[i], expected_out[i], real_out[i]))
|
||||
if not err_fields:
|
||||
return "OK"
|
||||
else:
|
||||
return "Mismatch in fields %s" % str(err_fields)
|
||||
return "Mismatch in fields:\n%s" % "\n".join([fmt_error(err) for err in err_fields])
|
||||
|
||||
current_input = []
|
||||
current_output = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue