Skip to content

Commit

Permalink
Fix @sandbox@ substitution in file names on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Mar 20, 2024
1 parent 69078ff commit e0c83cf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)

# Also update version in nihtest/__main__.py and pyproject.toml
project(nihtest
VERSION 1.5.1
VERSION 1.5.2
DESCRIPTION "NiH testing framework"
HOMEPAGE_URL "https://github.com/nih-at/nihtest"
LANGUAGES C)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.5.2 [2024-03-20]

- Fix @SANDBOX@ substitution in file names on Windows.

# 1.5.1 [2024-03-15]

- Fix preload test with newer glibc.
Expand Down
4 changes: 1 addition & 3 deletions nihtest/File.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import os
import pathlib
import re
import shutil

from nihtest import Command
from nihtest import Environment
from nihtest import Configuration
from nihtest import Utility

sandbox = re.compile("@SANDBOX@")

class Data:
def __init__(self, file_name, data=None):
Expand All @@ -23,7 +21,7 @@ def __init__(self, name, input=None, result=None):
self.result = result

def file_name(self, directory):
return sandbox.sub(os.path.abspath(directory), self.name)
return self.name.replace("@SANDBOX@", os.path.abspath(directory))

def compare(self, configuration, directory):
if not self.result:
Expand Down
2 changes: 1 addition & 1 deletion nihtest/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from nihtest import Test
from nihtest import Configuration

VERSION = "1.5.1"
VERSION = "1.5.2"


def main():
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nihtest"
version = "1.5.1"
version = "1.5.2"
authors = [
{ name="Dieter Baron", email="dillo@nih.at" },
{ name="Thomas Klausner", email="wiz@gatalith.at"}
Expand All @@ -30,7 +30,7 @@ dependencies = [
nihtest = "nihtest.__main__:main"

[tool.bumpver]
current_version = "1.5.1"
current_version = "1.5.2"
version_pattern = "MAJOR.MINOR.PATCH"

[tool.bumpver.file_patterns]
Expand Down

0 comments on commit e0c83cf

Please sign in to comment.