Comments (8)
This issue isn't really an issue in the true sense of the word. I'm just opening an issue because I wasn't sure where else to get some insight.
First, thanks for the issue, appreciate that!
I noticed that passing test case locations that aren't in the current directory, and therefore contain a directory, are not supported. Is there a technical reason for this limitation?
Yes, the main limitation is that there are concurrent reduction candidates of the reduced files and each of them is copied into a temporary folder. And that's why C-Vise does not modify a source file(s) in place. However, I've faced similar challenge you have multiple times in the future and I always made a workaround:
-I location
for include of header filescp xxx . && gcc a.c ...
- interestingness test can also copy files first- I hardcoded not modified locations with absolute paths:
gcc a.c /tmp/[bcd].o
I use multidelta quite a bit. My workflows usually involve minimising complex applications which often come with source trees that aren't necessarily "flat", and multidelta is happy to accept testcases with folders in the path.
Fully makes sense.
I'm happy to poke around in the cvise source code and contribute a patch that would allow users to pass test cases that contain directories, but I just wanted to make sure that there wasn't some historical context behind the limitation first. Perhaps someone has already tried this and it was too awkward to support? Any insight would be valuable.
No, I haven't made any attempt and I would welcome a patch regarding this problem. I can imagine a new option that would make a copy of a given folder to the temporary file. Or do you have any better solution? Please, keep in mind the reduction happens in parallel and so an application folder can't interact in between parallel processes.
from cvise.
I've faced similar challenge you have multiple times in the future and I always made a workaround
Great minds think alike. I've also implemented similar workarounds for my use cases.
I can imagine a new option that would make a copy of a given folder to the temporary file. Or do you have any better solution?
That's the solution I had in mind. Take the user-provided test case, which contains a folder, and strip the filename. There are tools like basename
that do this in UNIX so I'm sure there are spiritual equivalents provided by the path
module in python. Then have cvise
do the equivalent of mkdir -p <part of path containing only the directories>
inside the temporary test directory and copy the test case there.
I can probably quite easily make a patch for this if you're interested.
from cvise.
All right, so I made a prototype in the following branch:
https://github.com/marxin/cvise/tree/add--copy-extra-folder
It adds a new argument --copy-extra-folder
that copies content (recursively) of a directory to a temporary place where inter. test is run. Note the reduced test-cases may be contained in the folder and it can be also .
folder if you want.
Please test it and give me a feedback if it's feasible or not.
from cvise.
I didn't expect the entire contents of the tree to be copied over, just the test case and supporting folder structure. Maybe this doesn't matter, though.
from cvise.
Oh, you expected only the supporting folder structure. So can you please reduce my patch candidate, probably rename the option, test it, and make a pull request that would fill your needs? Thanks.
from cvise.
Sure, I'd be happy to.
from cvise.
My attempt is in #132.
Constructive criticism is very welcome.
from cvise.
Fixed in #133
from cvise.
Related Issues (20)
- error: no type named 'Designator' in 'clang::DesignatedInitExpr' HOT 1
- RFC for improvement: (1) add support for GCC compilation. (2) This may be a red herring, but we may want to eliminate lines from the end, NOT fromt he begining. HOT 8
- New release for LLVM 16 support? HOT 3
- remove-unused-outer-class is very restrictive on what it removes HOT 1
- cvise stops intermittently HOT 7
- Parallelism doesn't do much HOT 9
- When are shortcuts taken into account? HOT 3
- clang_delta: […] clang::Expr::ClassifyImpl(…) const: Assertion `isLValue()' failed. HOT 15
- cvise: running only the "light" transformations HOT 2
- ability to use /bin/sh for --commands HOT 2
- Release new version HOT 1
- Understanding C-Vise Performance with multiple cores and Comparison with C-Reduce HOT 7
- Idiomatic way to avoid reductions on some parts of the code? HOT 2
- C-Vise doesn't build with recent LLVM hashes HOT 1
- cvise fails to build with LLVM 18.1.0 HOT 7
- Permission denied failure on Windows HOT 23
- Req: cvise use with runtime errors HOT 1
- LLVM 19: Build failures HOT 8
- CVise fills temp directory on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvise.