WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 82a97dfe authored by John Zhang's avatar John Zhang
Browse files

add rpython sha1sum target

parent 8d9c2f97
......@@ -1003,10 +1003,10 @@ def test_make_boot_image_simple():
t = Translation(pypy_mu_entry, [rffi.INT, rffi.CCHARPP],
backend='mu', muimpl='fast', mucodegen='api')
t.driver.standalone = True # force standalone
t.driver.exe_name = 'test_make_boot_image_%(backend)s'
t.driver.exe_name = '/tmp/test_make_boot_image_%(backend)s'
exe = py.path.local('test_make_boot_image_mu.mu')
exe = py.path.local('/tmp/test_make_boot_image_mu.mu')
# zebu
res = platform.execute(str(exe), 'abc', '123')
......@@ -1017,6 +1017,36 @@ def test_make_boot_image_simple():
assert res.out == '%s\nabc\n123\n' % exe
def test_rpytarget_sha1sum():
john1 = \
In the beginning was the Word, and the Word was with God, and the Word was God.
He was in the beginning with God.
All things were made through him, and without him was not any thing made that was made.
In him was life, and the life was the light of men.
The light shines in the darkness, and the darkness has not overcome it.
from rpython.translator.goal.targetsha1sum import entry_point
from rpython.translator.interactive import Translation
t = Translation(entry_point, None,
backend='mu', muimpl='fast', mucodegen='api')
t.driver.standalone = True # force standalone
t.driver.exe_name = '/tmp/test_sha1sum_%(backend)s'
exe = py.path.local('/tmp/test_sha1sum_mu.mu')
test_file = py.path.local('/tmp/john1.txt')
with test_file.open('w') as fp:
# zebu
res = platform.execute(str(exe), 'abc', '123')
# holstein
# res = platform.execute('/Users/johnz/Documents/Work/mu-impl-ref2/tools/runmu.sh',
# ['--vmLog=ERROR', str(exe), str(test_file)])
assert res.returncode == 0, res.err
assert res.out == '53b45a7e3fb6ccb2d9e43c45cb57b6b56c784def /tmp/john1.txt\n'
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment