Skip to content

Commit

Permalink
Merge branch 'hotfix/bugfix-global-variables-substitution'
Browse files Browse the repository at this point in the history
  • Loading branch information
szaghi committed Dec 20, 2016
2 parents 7976000 + 14208b0 commit 308b85d
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/python/fobis/Fobos.py
Expand Up @@ -157,7 +157,8 @@ def _substitute_local_variables_section(self, section):
for item in self.fobos.items(section):
item_val = item[1]
for key, value in self.local_variables.items():
item_val = re.sub(r"(?!" + re.escape(key) + r"[aZ_-])\s*" + re.escape(key) + r"\s*", value, item_val)
item_val = re.sub(re.escape(key), value, item_val)
# item_val = re.sub(r"(?!" + re.escape(key) + r"[aZ_-])\s*" + re.escape(key) + r"\s*", value, item_val)
self.fobos.set(section, item[0], item_val)
return

Expand Down
@@ -0,0 +1 @@
-c -fPIC
27 changes: 27 additions & 0 deletions src/unittest/python/build-test26/fobos
@@ -0,0 +1,27 @@
[modes]
modes = static

[common-variables]
$STATIC_LIB = build-test26
$CGLAGS_GNU = -c
$OPTIMIZE_GNU = -O2

[static]
compiler = Gnu
cflags = $CGLAGS_GNU $OPTIMIZE_GNU
mod_dir = ./mod/
obj_dir = ./obj/
build_dir = ./
src = ./src/
colors = True
quiet = False
target = library.f90
output = $STATIC_LIB
mklib = static
log = True
verbose = True

[rule-finalize]
help = Rule for preparing the next test
quiet = True
rule = echo ""
9 changes: 9 additions & 0 deletions src/unittest/python/build-test26/src/library.f90
@@ -0,0 +1,9 @@
module library
use NesteD_1
implicit none
contains
subroutine print_hello_world()
implicit none
print '(A)',hello_world
endsubroutine print_hello_world
endmodule library
3 changes: 3 additions & 0 deletions src/unittest/python/build-test26/src/nested-1/first_dep.f90
@@ -0,0 +1,3 @@
module nested_1
include 'second_dep.inc'
endmodule nested_1
@@ -0,0 +1,2 @@
implicit none
character(len=12), parameter:: hello_world='Hello World!'
2 changes: 1 addition & 1 deletion src/unittest/python/suite_tests.py
Expand Up @@ -183,7 +183,7 @@ def test_buildings(self):
num_failures = 0
failed = []

for test in range(24):
for test in range(25):
if test + 1 == 15 and not opencoarrays:
continue
build_ok = self.run_build('build-test' + str(test + 1))
Expand Down

0 comments on commit 308b85d

Please sign in to comment.