config.py (13301:0ef9dd4e1154) config.py (13311:45408a89d50e)
1# Copyright 2018 Google, Inc.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met: redistributions of source code must retain the above copyright
6# notice, this list of conditions and the following disclaimer;
7# redistributions in binary form must reproduce the above copyright
8# notice, this list of conditions and the following disclaimer in the

--- 33 unchanged lines hidden (view full) ---

42
43parser = argparse.ArgumentParser()
44parser.add_argument('--working-dir')
45
46args = parser.parse_args()
47if args.working_dir:
48 os.chdir(args.working_dir)
49
1# Copyright 2018 Google, Inc.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met: redistributions of source code must retain the above copyright
6# notice, this list of conditions and the following disclaimer;
7# redistributions in binary form must reproduce the above copyright
8# notice, this list of conditions and the following disclaimer in the

--- 33 unchanged lines hidden (view full) ---

42
43parser = argparse.ArgumentParser()
44parser.add_argument('--working-dir')
45
46args = parser.parse_args()
47if args.working_dir:
48 os.chdir(args.working_dir)
49
50kernel.sc_main("Hello", "World");
50kernel.sc_main();
51
52m5.instantiate(None)
53
54cause = m5.simulate(m5.MaxTick).getCause()
55
56result = kernel.sc_main_result()
57if result.code != 0:
58 # Arguably this should make gem5 fail, but some tests purposefully
59 # generate errors, and as long as their output matches that's still
60 # considered correct. A "real" systemc config should expect sc_main
61 # (if present) not to fail.
62 sys.exit(int(result.code))
51
52m5.instantiate(None)
53
54cause = m5.simulate(m5.MaxTick).getCause()
55
56result = kernel.sc_main_result()
57if result.code != 0:
58 # Arguably this should make gem5 fail, but some tests purposefully
59 # generate errors, and as long as their output matches that's still
60 # considered correct. A "real" systemc config should expect sc_main
61 # (if present) not to fail.
62 sys.exit(int(result.code))