2

When I'm trying to run riscv emulator asm tests I faced with below error:

./emulator-DefaultCPPConfig +dramsim +max-cycles=100000000 +verbose +loadmem=output/rv64ui-p-amoand_d.hex none 2> output/rv64ui-p-amoand_d.out && [ $PIPESTATUS -eq 0 ]
/bin/sh: 1: [: -eq: unexpected operator
make: *** [output/rv64ui-p-amoand_d.out] Error 2

I followed your instruction in your git. It can build emulator without any error, but problem happens when it's trying to run tests.

I added bash behind of the command in the makefile and the first error solved but when I did that I got a new error:

bash ./emulator-DefaultCPPConfig +dramsim +max-cycles=100000000 +verbose +loadmem=output/rv64ui-p-amoswap_d.hex none 2> output/rv64ui-p-amoswap_d.out && [ $PIPESTATUS -eq 0 ]
make: *** [output/rv64ui-p-amoswap_d.out] Error 126
4

1 回答 1

1

问题来自 Shell 变量,我只需要在 Makefile 中添加以下行:

SHELL=/bin/bash

它会解决问题。

于 2015-04-05T08:07:20.370 回答