hpcugent/easybuild-framework — pull request #840 by boegel (2014-02-07 08:34:23+00:00)
Title: add toy build unit test with easyconfig in format v2 and version section markers, including nesting

@stdweird: This only adds a unit test for an easyconfig in format v2 that includes version section markers and nesting. The unit test itself is also incomplete, but trying to parse this example now leads to the below (which doesn't make sense to me), which will have to be fixed first:

```
$ eb test/framework/easyconfigs/v2.0/toy-with-sections.eb --experimental
== temporary log file in case of crash /var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-okoKcx/easybuild-i5A_DI.log
Traceback (most recent call last):
File "/Users/kehoste/work/easybuild-framework/easybuild/main.py", line 360, in
main()
File "/Users/kehoste/work/easybuild-framework/easybuild/main.py", line 265, in main
ecs = process_easyconfig(ec_file, build_options=build_options, build_specs=build_specs)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/tools.py", line 257, in process_easyconfig
ec = EasyConfig(spec, build_options=build_options, build_specs=build_specs)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/easyconfig.py", line 135, in __init__
self.parse()
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/easyconfig.py", line 212, in parse
local_vars = parser.get_config_dict()
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/parser.py", line 146, in get_config_dict
return self._formatter.get_config_dict()
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/format/two.py", line 106, in get_config_dict
co = EBConfigObj(self.configobj)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/format/format.py", line 117, in __init__
self.parse(configobj)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/format/format.py", line 290, in parse
self.sections = self.parse_sections(self.configobj)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/format/format.py", line 185, in parse_sections
new_value = self.parse_sections(configobj, toparse=value, parent=value.parent, depth=value.depth)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyconfig/format/format.py", line 188, in parse_sections
parsed[new_key] = new_value
File "/Users/kehoste/work/easybuild-framework/easybuild/tools/configobj.py", line 600, in __setitem__
raise ValueError('The key "%s" is not a string.' % key)
ValueError: The key "<= 1.5" is not a string.
```