From 60e79c0e5edb2747c36e48911740b141da329d48 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Tue, 12 Feb 2019 14:35:48 +0100
Subject: [PATCH] [skip ci][autotune] Use SHA256 in file anme generation

Unix has a hard 256 character limit on filenames. I have no idea
how to work around this except for applying a hash function.
---
 python/dune/codegen/sumfact/autotune.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/dune/codegen/sumfact/autotune.py b/python/dune/codegen/sumfact/autotune.py
index 566e15de..c2ffd350 100644
--- a/python/dune/codegen/sumfact/autotune.py
+++ b/python/dune/codegen/sumfact/autotune.py
@@ -13,6 +13,7 @@ import os
 import re
 import subprocess
 import filelock
+import hashlib
 
 
 def get_cmake_cache_entry(entry):
@@ -193,6 +194,7 @@ def autotune_realization(sf):
 
     basename = "autotune_sumfact_{}".format(sf.function_name)
     name = os.path.join(dir, "autotune_sumfact_{}".format(sf.function_name))
+    name = hashlib.sha256(name.encode()).hexdigest()
     filename = os.path.join(dir, "{}.cc".format(basename))
     logname = os.path.join(dir, "{}.log".format(basename))
     lock = "{}.lock".format(name)
-- 
GitLab