8000 bug fix for tcmd unitest · cheoljoo/doxygen_perlmod_python@71ffd73 · GitHub
[go: up one dir, main page]

Skip to content

Commit 71ffd73

Browse files
author
charles.lee
committed
bug fix for tcmd unitest
1 parent a1b873f commit 71ffd73

File tree

3 files changed

+53
-30
lines changed

3 files changed

+53
-30
lines changed

taf/Makefile

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
DEST_DIR := "_hpp_"
2-
SERFILES := $(shell find $(INDIR) -name "*.h" -o -name "*.hpp" -o -name "*.hxx")
3-
ALL_DIR := "_all_"
4-
SERALLFILES := $(shell find $(INDIR) -name "*.h" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.c" -o -name "*.cpp" -o -name "*.cxx")
5-
# 절대 경로 변환
61

72
all:
8-
#ifndef GITDIR
9-
#@echo "error: GITDIR is not defined"
10-
#exit 4
11-
#endif
12-
#@echo "GITDIR = ${GITDIR}"
133
ifndef INDIR
144
@echo "error: INDIR is not defined"
155
exit 4
@@ -22,18 +12,14 @@ endif
2212
@echo "OUTDIR = ${OUTDIR}"
2313
@echo "MODULE = ${MODULE}"
2414
@echo "FILES = ${FILES}"
15+
rm -rf _hpp_ _all_
16+
python3 copyFile.py --inDir=${INDIR} --startDirname="service,include,interface" --endExt="hpp,hxx,h" --destDir="_hpp_"
17+
python3 copyFile.py --inDir=${INDIR} --startDirname="service,include,interface" --endExt="hpp,hxx,h,c,cpp,cxx" --destDir="_all_"
2518
if [ ! -e mysetting.py ]; then cp -f ../src/mysetting_example.py mysetting.py; fi
26-
git clone https://github.com/cheoljoo/doxygen_perlmod_python.git ${GITDIR}
27-
mkdir -p ${OUTDIR}/hpp
28-
find ${INDIR} \( -name "*.h" -o -name "*.hpp" \) -exec cp -f {} ${OUTDIR}/hpp \;
29-
rm -rf _hpp_ plantuml.md
30-
mkdir -p _all_
31-
make copyall
32-
-doxygen_flowchart Doxyfile.flowchart > dfc.log
33-
rm -rf _hpp_ _output_ _plantuml DoxyDocs.pm DoxyDocs.py
34-
mkdir -p _hpp_
35-
make copy
36-
doxygen
19+
rm -rf plantuml.md
20+
-doxygen_flowchart Doxyfile.flowchart > dfc.log # _all_
21+
rm -rf _output_ _plantuml DoxyDocs.pm DoxyDocs.py
22+
doxygen # _hpp_
3723
echo "DoxyDocs.pm is used for this document" > a.log
3824
cp -f _output_/perlmod/DoxyDocs.pm . >> a.log
3925
echo "doxy2py.pl" >> a.log
@@ -44,11 +30,3 @@ endif
4430
mkdir -p ${OUTDIR} >> a.log
4531
if [ -e plantuml.md ]; then cp -f plantuml.md ${OUTDIR}; fi
4632
docker run -it --user `id -u`:`id -g` -v `pwd`/_hpp_:/docker_in -v `realpath ${OUTDIR}`:/docker_out -v `pwd`:/docker_git -e DOCKER_IN=/docker_in -e DOCKER_OUT=/docker_out -e DOCKER_GIT=/docker_git -e DOCKER_MODULE=${MODULE} doxygen_perlmod_python:latest bash /docker_git/taf_run_in_docker.sh >> a.log
47-
48-
copy: $(SERFILES)
49-
@mkdir -p $(DEST_DIR)
50-
cp $^ $(DEST_DIR)
51-
52-
copyall: $(SERALLFILES)
53-
@mkdir -p $(ALL_DIR)
54-
cp $^ $(ALL_DIR)

taf/copyFile.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import sys,os
2+
sys.path.append(os.getcwd())
3+
import argparse
4+
import json
5+
import shutil
6+
7+
if (__name__ == "__main__"):
8+
parser = argparse.ArgumentParser(
9+
prog=sys.argv[0],
10+
description=
11+
'copy file to <specific-dir> : starts with <specific-dirname> and ends with <specific-extension>'
12+
)
13+
parser.add_argument( '--inDir',
14+
metavar="<str>",
15+
type=str,
16+
default='core/service',
17+
help='starting directory for searching')
18+
parser.add_argument( '--startDirname',
19+
metavar="<str>",
20+
type=str,
21+
default='service,include,interface',
22+
help='several starting directory name with comma in <inDir>')
23+
parser.add_argument( '--endExt',
24+
metavar="<str>",
25+
type=str,
26+
default='h,hpp,hxx',
27+
help='several extension with comma in <inDir>')
28+
parser.add_argument( '--destDir',
29+
metavar="<str>",
30+
type=str,
31+
default='_hpp_',
32+
help='output directory for tcmd to gather serviced files')
33+
args = parser.parse_args()
34+
35+
os.makedirs(args.destDir,exist_ok=True)
36+
startList = [ x.strip() for x in args.startDirname.split(',') ]
37+
extList = [ x.strip() for x in args.endExt.split(',') ]
38+
39+
for s in startList:
40+
for root , dirs,files in os.walk(args.inDir + '/' + s):
41+
print(root,files)
42+
for file in files:
43+
if file.split('.')[-1] in extList:
44+
print('copy',os.path.join(root, file), args.destDir)
45+
shutil.copy(os.path.join(root, file), args.destDir)
46+

tcmd/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ endif
2525
@echo "MODULE = ${MODULE}"
2626
@echo "FILES = ${FILES}"
2727
if [ ! -e mysetting.py ]; then cp -f ../src/mysetting_example.py mysetting.py; fi
28-
#git clone https://github.com/cheoljoo/doxygen_perlmod_python.git ${GITDIR}
2928
#mkdir -p ${OUTDIR}/hpp
3029
#find ${INDIR} \( -name "*.h" -o -name "*.hpp" \) -exec cp -f {} ${OUTDIR}/hpp \;
3130
rm -rf _hpp_ _output_ _plantuml

0 commit comments

Comments
 (0)
0