Skip to content

Commit

Permalink
add arm backend to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdalla committed Aug 11, 2024
1 parent d4abe28 commit 43bf744
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

from backend.flexpret_backend.flexpret_backend import FlexpretBackend
from backend.x86_backend.x86_backend import X86Backend
from backend.arm_backend.arm_backend import ArmBackend
from backend.backend import Backend
from smt_solver.extract_labels import find_labels

Expand Down Expand Up @@ -101,7 +102,7 @@ def __init__(self, project_config: ProjectConfiguration):

self.dag_path: str = ""

backend_dict = {"Flexpret": FlexpretBackend, "X86": X86Backend}
backend_dict = {"Flexpret": FlexpretBackend, "X86": X86Backend, "ARM": ArmBackend}

if self.project_config.backend not in backend_dict:
raise GameTimeError("No valid backend specified")
Expand Down
1 change: 1 addition & 0 deletions test/tacle_test/programs/if_elif_else/if_elif_else.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <stdio.h>

int test (int x) {
// if (x < 0 && b < 0) {
Expand Down
7 changes: 6 additions & 1 deletion test/tacle_test/wcet_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ class TestFlexpretBackend(BaseTest):
backend_value = "Flexpret"
class TestX86Backend(BaseTest):
backend_value = "X86"
class TestARMBackend(BaseTest):
backend_value = "ARM"


#### Benchmarks
class TestIfElifElseFlexpret(TestFlexpretBackend):
config_path = "./programs/if_elif_else/config.yaml"
class TestIfElifElseX86(TestX86Backend):
config_path = "./programs/if_elif_else/config.yaml"
class TestIfElifElseARM(TestARMBackend):
config_path = "./programs/if_elif_else/config.yaml"



Expand Down Expand Up @@ -109,8 +113,9 @@ class TestBinarysearchX86(TestX86Backend):
# suite.addTests(loader.loadTestsFromTestCase(TestIfElifElseFlexpret))
# suite.addTests(loader.loadTestsFromTestCase(TestBitcnt2Flexpret))
# suite.addTests(loader.loadTestsFromTestCase(TestPrimeFlexpret))
suite.addTests(loader.loadTestsFromTestCase(TestModexpFlexpret))
# suite.addTests(loader.loadTestsFromTestCase(TestIfElifElseX86))
# suite.addTests(loader.loadTestsFromTestCase(TestBinarysearchFlexpret))
suite.addTests(loader.loadTestsFromTestCase(TestIfElifElseARM))

runner = unittest.TextTestRunner()
runner.run(suite)

0 comments on commit 43bf744

Please sign in to comment.