bench: mv input files to bench/input
only used by input crate, avoid cluttering bench dir
This commit is contained in:
		
					parent
					
						
							
								bee3d5d747
							
						
					
				
			
			
				commit
				
					
						5de8543bb0
					
				
			
		
					 3 changed files with 3 additions and 3 deletions
				
			
		
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -49,7 +49,7 @@ bench:
 | 
				
			||||||
	git submodule update --init modules/djot.js
 | 
						git submodule update --init modules/djot.js
 | 
				
			||||||
	for f in $$(find modules/djot.js/bench -name '*.dj' | xargs basename -a); do \
 | 
						for f in $$(find modules/djot.js/bench -name '*.dj' | xargs basename -a); do \
 | 
				
			||||||
		dst=$$(echo $$f | sed 's/-/_/g'); \
 | 
							dst=$$(echo $$f | sed 's/-/_/g'); \
 | 
				
			||||||
		ln -fs ../modules/djot.js/bench/$$f bench/$$dst; \
 | 
							ln -fs ../../modules/djot.js/bench/$$f bench/input/$$dst; \
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cov: suite suite_bench
 | 
					cov: suite suite_bench
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
use std::io::Write;
 | 
					use std::io::Write;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn main() {
 | 
					fn main() {
 | 
				
			||||||
    let inputs = std::fs::read_dir("..")
 | 
					    let inputs = std::fs::read_dir(".")
 | 
				
			||||||
        .unwrap()
 | 
					        .unwrap()
 | 
				
			||||||
        .filter_map(|entry| {
 | 
					        .filter_map(|entry| {
 | 
				
			||||||
            let entry = entry.ok()?;
 | 
					            let entry = entry.ok()?;
 | 
				
			||||||
| 
						 | 
					@ -9,7 +9,7 @@ fn main() {
 | 
				
			||||||
                if let Some(name) = name.strip_suffix(".dj") {
 | 
					                if let Some(name) = name.strip_suffix(".dj") {
 | 
				
			||||||
                    if entry.file_type().map_or(false, |ty| !ty.is_dir()) {
 | 
					                    if entry.file_type().map_or(false, |ty| !ty.is_dir()) {
 | 
				
			||||||
                        let input = std::fs::read_to_string(
 | 
					                        let input = std::fs::read_to_string(
 | 
				
			||||||
                            std::path::Path::new("..").join(entry.file_name()),
 | 
					                            std::path::Path::new(".").join(entry.file_name()),
 | 
				
			||||||
                        )
 | 
					                        )
 | 
				
			||||||
                        .ok()?;
 | 
					                        .ok()?;
 | 
				
			||||||
                        return Some((name.to_string(), input));
 | 
					                        return Some((name.to_string(), input));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue